Class: SiSU_XHTML::Source::Output

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

Instance Method Summary collapse

Constructor Details

#initialize(data, md) ⇒ Output

Returns a new instance of Output.



416
417
418
419
# File 'lib/sisu/xhtml.rb', line 416

def initialize(data,md)
  @data,@md=data,md
  @file=SiSU_Env::FileOp.new(@md)
end

Instance Method Details

#xhtmlObject



420
421
422
423
424
425
426
427
428
# File 'lib/sisu/xhtml.rb', line 420

def xhtml
  SiSU_Env::FileOp.new(@md).mkdir
  filename_xml=@file.write_file.xhtml
  @data.each do |str|
    str=str.gsub(/\A\s+\Z/m,'') #str.gsub(/^\s+$/,'')
    filename_xml.puts str unless str.empty?
  end
  filename_xml.close
end