diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-01-06 22:42:31 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-01-06 22:42:31 -0500 |
commit | 0e42ce6f34c3cfdf370f439f58c4e3de8b05ea92 (patch) | |
tree | 6fc9ffb3f627a91138a1479d6fa144687b7b45e3 /lib/sisu/v5/digests.rb | |
parent | v5: docbook, fictionbook, some tidying (diff) |
v5: cosmetic code, case statement
Diffstat (limited to 'lib/sisu/v5/digests.rb')
-rw-r--r-- | lib/sisu/v5/digests.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/sisu/v5/digests.rb b/lib/sisu/v5/digests.rb index e5f0b0ae..2b010374 100644 --- a/lib/sisu/v5/digests.rb +++ b/lib/sisu/v5/digests.rb @@ -336,17 +336,17 @@ module SiSU_DigestView data.each do |t_o| if t_o.is==:heading x=case t_o.ln - when 1; l[1] +=1 #fix Mx[:lv_o] + when 1 then l[1] +=1 #fix Mx[:lv_o] ' '*0 << ':A' - when 2; l[2] +=1 #fix Mx[:lv_o] + when 2 then l[2] +=1 #fix Mx[:lv_o] ' '*1 << ':B' - when 3; l[3] +=1 #fix Mx[:lv_o] + when 3 then l[3] +=1 #fix Mx[:lv_o] ' '*2 << ':C' - when 4; l[4] +=1 #fix Mx[:lv_o] + when 4 then l[4] +=1 #fix Mx[:lv_o] ' '*3 << '1' - when 5; l[5] +=1 #fix Mx[:lv_o] + when 5 then l[5] +=1 #fix Mx[:lv_o] ' '*4 << '2' - when 6; l[6] +=1 #fix Mx[:lv_o] + when 6 then l[6] +=1 #fix Mx[:lv_o] ' '*5 << '3' else nil end @@ -359,12 +359,12 @@ module SiSU_DigestView ao_structure_summary("document structure[*]\n") [0,1,2,3,4,5,6].each do |y| v=case y - when 1; ':A' - when 2; ':B' - when 3; ':C' - when 4; '1 ' - when 5; '2 ' - when 6; '3 ' + when 1 then ':A' + when 2 then ':B' + when 3 then ':C' + when 4 then '1 ' + when 5 then '2 ' + when 6 then '3 ' end ao_structure_summary("#{v} = #{l[y]}\n") if l[y] > 0 end |