Class: SiSU_Txt_Plain::Source
- Inherits:
-
Object
- Object
- SiSU_Txt_Plain::Source
- Includes:
- SiSU_Txt_Read
- Defined in:
- lib/sisu/txt_plain.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Scroll
Instance Method Summary collapse
-
#initialize(opt) ⇒ Source
constructor
A new instance of Source.
- #read ⇒ Object
Methods included from SiSU_Txt_Read
Constructor Details
#initialize(opt) ⇒ Source
Returns a new instance of Source.
72 73 74 75 76 77 |
# File 'lib/sisu/txt_plain.rb', line 72 def initialize(opt) @opt=opt unless @opt.fns =~/(.+?)\.(?:-|ssm\.)?sst$/ puts "#{sf} not a processed file type" end end |
Instance Method Details
#read ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/sisu/txt_plain.rb', line 78 def read begin md=SiSU_Param::Parameters.new(@opt).get specific={ description: 'Plaintext (utf-8)', output_path: md.file.output_path.txt.dir, output_file: md.file.base_filename.txt, } read_generic(@opt,specific) SiSU_Txt_Plain::Source::Scroll.new(md,@ao_array,@wrap_width).songsheet rescue SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure end end |