class SiSU_QRcode::Source
Public Class Methods
new(opt)
click to toggle source
# File lib/sisu/qrcode.rb, line 67 def initialize(opt) @opt=opt @particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt) l=SiSU_Env::StandardiseLanguage.new(@opt.lng).language @doc_language=l[:n] end
Public Instance Methods
read()
click to toggle source
# File lib/sisu/qrcode.rb, line 73 def read begin @env=SiSU_Env::InfoEnv.new(@opt.fns,@opt) @md=SiSU_Param::Parameters.new(@opt).get xbrowser=@env.program.web_browser browser=@env.program.console_web_browser unless @opt.act[:quiet][:set]==:on url_html="file://#{@md.file.output_path.manifest.dir}/#{@md.file.base_filename.manifest}" (@opt.act[:verbose][:set]==:on \ || @opt.act[:verbose_plus][:set]==:on \ || @opt.act[:maintenance][:set]==:on) \ ? SiSU_Screen::Ansi.new( @opt.act[:color_state][:set], 'QR code', "#{xbrowser} #{url_html}" ).green_hi_blue : SiSU_Screen::Ansi.new( @opt.act[:color_state][:set], 'QR code', "[#{@opt.f_pth[:lng_is]}] #{@opt.fns}" ).green_title_hi if (@opt.act[:verbose][:set]==:on \ || @opt.act[:verbose_plus][:set]==:on \ || @opt.act[:maintenance][:set]==:on) SiSU_Screen::Ansi.new( @opt.act[:color_state][:set], "#{browser} #{url_html}" ).grey_tab end end data=SiSU_HTML::Source::HTML_Environment.new(@particulars).tuned_file_instructions OutputInfo.new(@md).check_output(data) rescue SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@opt.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure end end