Class: SiSU_XML_DOM::Source::Songsheet

Inherits:
Object
  • Object
show all
Defined in:
lib/sisu/xml_dom.rb

Instance Method Summary collapse

Constructor Details

#initialize(particulars) ⇒ Songsheet

Returns a new instance of Songsheet.



136
137
138
139
140
# File 'lib/sisu/xml_dom.rb', line 136

def initialize(particulars)
  @env,             @md,           @ao_arr,             @particulars=
    particulars.env,particulars.md,particulars.ao_array,particulars
  @file=SiSU_Env::FileOp.new(@md)
end

Instance Method Details

#songsheetObject



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/sisu/xml_dom.rb', line 141

def songsheet
  begin
    SiSU_XML_DOM::Source::Scroll.new(@particulars).songsheet
    if (@md.opt.act[:verbose][:set]==:on \
    || @md.opt.act[:verbose_plus][:set]==:on \
    || @md.opt.act[:maintenance][:set]==:on)
      SiSU_XML_DOM::Source::Tidy.new(@md,@file.place_file.xml_dom.dir).xml # test wellformedness, comment out when not in use
    end
    SiSU_Rexml::Rexml.new(@md,@file.place_file.xml_dom.dir).xml if @md.opt.act[:maintenance][:set]==:on # test rexml parsing, comment out when not in use #debug
  rescue
    SiSU_Errors::Rescued.new($!,$@,@md.opt.selections.str,@md.fns).location do
      __LINE__.to_s + ':' + __FILE__
    end
  ensure
  end
end