diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-04-19 21:37:52 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-04-19 21:37:52 -0400 |
commit | 44464e284ee840ee0ef7eae2d3f8d589680b18ca (patch) | |
tree | 7967e499e253737a4d8573e9c903ee714be1e762 /lib/sisu/v3/dal_idx.rb | |
parent | v3: options, hub, introduce opt.act booleans, more setting in options (diff) |
v3: param, md remove md.cmd and md.mod shortcut methods, use use md.opt
* affects many files that now use @md.opt.cmd & @md.opt.mod
(instead of @md.cmd & @md.mod)
Diffstat (limited to 'lib/sisu/v3/dal_idx.rb')
-rw-r--r-- | lib/sisu/v3/dal_idx.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/sisu/v3/dal_idx.rb b/lib/sisu/v3/dal_idx.rb index dd2b1331..ad1b5efb 100644 --- a/lib/sisu/v3/dal_idx.rb +++ b/lib/sisu/v3/dal_idx.rb @@ -216,7 +216,7 @@ module SiSU_book_index @t=idx[:sst_rel].index(idx[:sst_rel].last) @q=idx[:html].index(idx[:html].last) @r=idx[:xhtml].index(idx[:xhtml].last) - print "\n" + x + ', ' if @md.cmd =~/V/ + print "\n" + x + ', ' if @md.opt.cmd =~/V/ elsif x.class==Array p 'array error? -->' print x @@ -228,13 +228,13 @@ module SiSU_book_index idx[:sst_rel][@t]=idx[:sst_rel][@t] + %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:ocn]}#{Mx[:rel_c]}, } idx[:html][@q]=idx[:html][@q] + %{<a href="#{a[:seg]}.html##{a[:ocn]}">#{a[:range]}</a>, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{<a href="#{a[:seg]}.xhtml#o#{a[:ocn]}">#{a[:range]}</a>, } - print a[:range] + ', ' if @md.cmd =~/V/ + print a[:range] + ', ' if @md.opt.cmd =~/V/ elsif a[:ocn] idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:seg]}.html##{a[:ocn]}#{Mx[:rel_c]}, } idx[:sst_rel][@t]=idx[:sst_rel][@t] + %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:ocn]}#{Mx[:rel_c]}, } idx[:html][@q]=idx[:html][@q] + %{<a href="#{a[:seg]}.html##{a[:ocn]}">#{a[:ocn]}</a>, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{<a href="#{a[:seg]}.xhtml#o#{a[:ocn]}">#{a[:ocn]}</a>, } - print a[:ocn] + ', ' if @md.cmd =~/V/ + print a[:ocn] + ', ' if @md.opt.cmd =~/V/ else p 'error' end end @@ -251,20 +251,20 @@ module SiSU_book_index idx[:html][@q]=idx[:html][@q] + %{\n<p class="book_index_lev2">#{k}, } c=clean_xml(k.dup) idx[:xhtml][@r]=idx[:xhtml][@r] + %{\n<p class="book_index_lev2">#{c}, } - print "\n\t" + k + ', ' if @md.cmd =~/V/ + print "\n\t" + k + ', ' if @md.opt.cmd =~/V/ y.each do |z| if z[:range] idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{z[:ocn]}#{Mx[:rel_c]}, } idx[:sst_rel][@t]=idx[:sst_rel][@t] + %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:ocn]}#{Mx[:rel_c]}, } idx[:html][@q]=idx[:html][@q] + %{<a href="#{z[:seg]}.html##{z[:ocn]}">#{z[:range]}</a>, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{<a href="#{z[:seg]}.xhtml#o#{z[:ocn]}">#{z[:range]}</a>, } - print z[:range] + ', ' if @md.cmd =~/V/ + print z[:range] + ', ' if @md.opt.cmd =~/V/ elsif z[:ocn] idx[:sst_rel_html_seg][@o]=idx[:sst_rel_html_seg][@o] + %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{z[:ocn]}#{Mx[:rel_c]}, } idx[:sst_rel][@t]=idx[:sst_rel][@t] + %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:ocn]}#{Mx[:rel_c]}, } idx[:html][@q]=idx[:html][@q] + %{<a href="#{z[:seg]}.html##{z[:ocn]}">#{z[:ocn]}</a>, } idx[:xhtml][@q]=idx[:xhtml][@q] + %{<a href="#{z[:seg]}.xhtml#o#{z[:ocn]}">#{z[:ocn]}</a>, } - print z[:ocn] + ', ' if @md.cmd =~/V/ + print z[:ocn] + ', ' if @md.opt.cmd =~/V/ else p 'error' end end @@ -278,7 +278,7 @@ module SiSU_book_index end end end - print "\n" if @md.cmd =~/V/ + print "\n" if @md.opt.cmd =~/V/ idx end def screen_print(the_idx) |