aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/dal_idx.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-03-01 20:41:28 -0500
committerRalph Amissah <ralph@amissah.com>2011-03-01 20:41:28 -0500
commit05a3fd233ec1ac4475bd797449d1284f6824c005 (patch)
treefdd93c057196640ec4907f58f66cf5bc00dfbdf6 /lib/sisu/v3/dal_idx.rb
parentv3: use rb1.9.2 "require_relative" syntax (diff)
v3: ruby 1.9 hash symbol syntax adopted
Diffstat (limited to 'lib/sisu/v3/dal_idx.rb')
-rw-r--r--lib/sisu/v3/dal_idx.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/sisu/v3/dal_idx.rb b/lib/sisu/v3/dal_idx.rb
index a965159d..dd2b1331 100644
--- a/lib/sisu/v3/dal_idx.rb
+++ b/lib/sisu/v3/dal_idx.rb
@@ -102,10 +102,10 @@ module SiSU_book_index
idxl=[]
g.each do |i|
i.strip!
- idxl << { :rough_idx => i, :ocn => ocn, :seg => seg }
+ idxl << { rough_idx: i, ocn: ocn, seg: seg }
end
idxl
- else { :rough_idx => idx_list, :ocn => ocn, :seg => seg }
+ else { rough_idx: idx_list, ocn: ocn, seg: seg }
end
end
idx_lst.flatten!
@@ -128,20 +128,20 @@ module SiSU_book_index
x=if idx_lst.length==1 or idx_lst[0].gsub(/\+\d+/,'')==i
the_idx[use]['term_node_lev1']=[] unless the_idx[use]['term_node_lev1'] and defined? the_idx[use]['term_node_lev1']
x=if r
- the_idx[use]['term_node_lev1'] << { :ocn => idx[:ocn], :range => "#{idx[:ocn]}-#{idx[:ocn].to_i+r.to_i}", :seg => idx[:seg] }
+ the_idx[use]['term_node_lev1'] << { ocn: idx[:ocn], range: "#{idx[:ocn]}-#{idx[:ocn].to_i+r.to_i}", seg: idx[:seg] }
"#{i} #{idx[:ocn]}-#{idx[:ocn].to_i+r.to_i}"
else
- the_idx[use]['term_node_lev1'] << { :ocn => idx[:ocn], :seg => idx[:seg] }
+ the_idx[use]['term_node_lev1'] << { ocn: idx[:ocn], seg: idx[:seg] }
"#{i} #{idx[:ocn]}"
end
else
the_idx[use]['term_node_lev2']={} unless the_idx[use]['term_node_lev2'] and defined? the_idx[use]['term_node_lev2']
the_idx[use]['term_node_lev2'][i]=[] unless the_idx[use]['term_node_lev2'][i] and defined? the_idx[use]['term_node_lev2'][i]
x=if r
- the_idx[use]['term_node_lev2'][i] << { :ocn => idx[:ocn], :range => "#{idx[:ocn]}-#{idx[:ocn].to_i+r.to_i}", :seg => idx[:seg] }
+ the_idx[use]['term_node_lev2'][i] << { ocn: idx[:ocn], range: "#{idx[:ocn]}-#{idx[:ocn].to_i+r.to_i}", seg: idx[:seg] }
"#{idx_lst[0]}:#{i} #{idx[:ocn]}-#{idx[:ocn].to_i+r.to_i}"
else
- the_idx[use]['term_node_lev2'][i] << { :ocn => idx[:ocn], :seg => idx[:seg] }
+ the_idx[use]['term_node_lev2'][i] << { ocn: idx[:ocn], seg: idx[:seg] }
"#{idx_lst[0]}:#{i} #{idx[:ocn]}"
end
end
@@ -163,15 +163,15 @@ module SiSU_book_index
@x=1
idx={}
idx[:sst_rel_html_seg],idx[:sst_rel],idx[:html],idx[:xhtml]=[],[],[],[]
- h={:obj=>Mx[:br_page]}
+ h={obj: Mx[:br_page]}
o=SiSU_document_structure::Object_layout.new.break(h)
idx[:sst_rel_html_seg] << o
idx[:sst_rel] << o
- h={:lv=>'2',:name=>'index',:obj=>"Index"}
+ h={lv: '2', name: 'index', obj: "Index"}
o=SiSU_document_structure::Object_heading.new.heading(h)
idx[:sst_rel_html_seg] << o
idx[:sst_rel] << o
- h={:lv=>'4',:name=>'idx',:obj=>" [Index] #{Mx[:pa_non_object_dummy_heading]}"}
+ h={lv: '4', name: 'idx', obj: " [Index] #{Mx[:pa_non_object_dummy_heading]}"}
o=SiSU_document_structure::Object_heading.new.heading(h)
idx[:sst_rel_html_seg] << o
idx[:sst_rel] << o