Class: SiSU_Manpage::Source

Inherits:
Object
  • Object
show all
Includes:
SiSU_Txt_Read
Defined in:
lib/sisu/manpage.rb

Direct Known Subclasses

Scroll

Defined Under Namespace

Classes: Scroll

Instance Method Summary collapse

Methods included from SiSU_Txt_Read

#read_generic

Constructor Details

#initialize(opt) ⇒ Source

Returns a new instance of Source.



73
74
75
76
77
78
79
80
# File 'lib/sisu/manpage.rb', line 73

def initialize(opt)
  @opt=opt
  if @opt.fns =~/(.+?)\.(?:-|ssm\.)?sst$/
    @@notes=:end
  else
    puts "#{sf} not a processed file type"
  end
end

Instance Method Details

#readObject



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/sisu/manpage.rb', line 81

def read
  begin
    md=SiSU_Param::Parameters.new(@opt).get
    specific={
      description:     'Manpage',
      output_path:     md.file.output_path.manpage.dir,
      output_file:     md.file.base_filename.manpage,
    }
    read_generic(@opt,specific)
    SiSU_Manpage::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
    Dir.chdir(@opt.f_pth[:pth])
  end
end