Class: SiSU_TexInfoFormat::TeXinfoTxt
- Inherits:
-
Object
- Object
- SiSU_TexInfoFormat::TeXinfoTxt
- Defined in:
- lib/sisu/texinfo_format.rb
Instance Method Summary collapse
- #clean(dob, txt) ⇒ Object
-
#initialize(md, dob, txt) ⇒ TeXinfoTxt
constructor
A new instance of TeXinfoTxt.
- #submenu ⇒ Object
- #subsubmenu ⇒ Object
Constructor Details
#initialize(md, dob, txt) ⇒ TeXinfoTxt
Returns a new instance of TeXinfoTxt.
515 516 517 |
# File 'lib/sisu/texinfo_format.rb', line 515 def initialize(md,dob,txt) @md,@dob,@txt=md,dob,txt end |
Instance Method Details
#clean(dob, txt) ⇒ Object
518 519 520 521 522 523 524 525 |
# File 'lib/sisu/texinfo_format.rb', line 518 def clean(dob,txt) if dob.is==:heading \ and txt !~/#{Dx[:ocn_o]}#{dob.ocn}#{Dx[:ocn_c]}/ txt=dob.ocn.is_a?(Fixnum) \ ? "#{dob.obj} #{Dx[:ocn_o]}#{dob.ocn}#{Dx[:ocn_c]}" : dob.obj end txt.strip end |
#submenu ⇒ Object
526 527 528 529 530 531 |
# File 'lib/sisu/texinfo_format.rb', line 526 def txt=@txt.join("\n") txt=clean(@dob,txt) txt="@menu\n#{txt}\n@end menu\n\n" txt=txt.gsub(/.+/m,"#{txt}") end |
#subsubmenu ⇒ Object
532 533 534 535 536 537 |
# File 'lib/sisu/texinfo_format.rb', line 532 def txt=@txt.join("\n") txt=clean(@dob,txt) txt="@menu\n#{txt}\n@end menu\n\n" txt=txt.gsub(/.+/m,"#{txt}") end |