aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/ao_doc_objects.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-01-06 22:42:31 -0500
committerRalph Amissah <ralph@amissah.com>2014-01-06 22:42:31 -0500
commit0e42ce6f34c3cfdf370f439f58c4e3de8b05ea92 (patch)
tree6fc9ffb3f627a91138a1479d6fa144687b7b45e3 /lib/sisu/v5/ao_doc_objects.rb
parentv5: docbook, fictionbook, some tidying (diff)
v5: cosmetic code, case statement
Diffstat (limited to 'lib/sisu/v5/ao_doc_objects.rb')
-rw-r--r--lib/sisu/v5/ao_doc_objects.rb36
1 files changed, 18 insertions, 18 deletions
diff --git a/lib/sisu/v5/ao_doc_objects.rb b/lib/sisu/v5/ao_doc_objects.rb
index 30c4ec55..229edee4 100644
--- a/lib/sisu/v5/ao_doc_objects.rb
+++ b/lib/sisu/v5/ao_doc_objects.rb
@@ -108,28 +108,28 @@ module SiSU_AO_DocumentStructure
end
def heading_ln(lv)
case lv
- when /A/; 1
- when /B/; 2
- when /C/; 3
- when /1/; 4
- when /2/; 5
- when /3/; 6
- when /4/; 7
- when /5/; 8
- when /6/; 9
+ when /A/ then 1
+ when /B/ then 2
+ when /C/ then 3
+ when /1/ then 4
+ when /2/ then 5
+ when /3/ then 6
+ when /4/ then 7
+ when /5/ then 8
+ when /6/ then 9
end
end
def heading_lv(ln)
case ln.to_s
- when /1/; 'A'
- when /2/; 'B'
- when /3/; 'C'
- when /4/; '1'
- when /5/; '2'
- when /6/; '3'
- when /7/; '4'
- when /8/; '5'
- when /9/; '6'
+ when /1/ then 'A'
+ when /2/ then 'B'
+ when /3/ then 'C'
+ when /4/ then '1'
+ when /5/ then '2'
+ when /6/ then '3'
+ when /7/ then '4'
+ when /8/ then '5'
+ when /9/ then '6'
end
end
def heading(h,o=nil)