Class: SiSU_XML_Fictionbook::Source

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

Direct Known Subclasses

Scroll

Defined Under Namespace

Classes: Scroll

Instance Method Summary collapse

Constructor Details

#initialize(opt) ⇒ Source

Returns a new instance of Source.



68
69
70
71
# File 'lib/sisu/xml_fictionbook2.rb', line 68

def initialize(opt)
  @opt=opt
  @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt)
end

Instance Method Details

#readObject



72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/sisu/xml_fictionbook2.rb', line 72

def read
  begin
    @md,@ao_array=@particulars.md,@particulars.ao_array
    @env=@particulars.env
    report
    SiSU_XML_Fictionbook::Source::Scroll.new(@ao_array,@md).songsheet
  rescue
    SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do
      __LINE__.to_s + ':' + __FILE__
    end
  ensure
    Dir.chdir(@opt.f_pth[:pth])
  end
end