Class: SiSU_XML_DOM::Source::Tidy
- Inherits:
-
Object
- Object
- SiSU_XML_DOM::Source::Tidy
- Defined in:
- lib/sisu/xml_dom.rb
Instance Method Summary collapse
-
#initialize(md, file) ⇒ Tidy
constructor
A new instance of Tidy.
- #xml ⇒ Object
Constructor Details
#initialize(md, file) ⇒ Tidy
Returns a new instance of Tidy.
588 589 590 591 |
# File 'lib/sisu/xml_dom.rb', line 588 def initialize(md,file) @md,@file=md,file @prog=SiSU_Env::InfoProgram.new end |
Instance Method Details
#xml ⇒ Object
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 |
# File 'lib/sisu/xml_dom.rb', line 592 def xml if @prog.tidy !=false if (@md.opt.act[:verbose_plus][:set]==:on \ || @md.opt.act[:maintenance][:set]==:on) unless @md.opt.act[:quiet][:set]==:on SiSU_Screen::Ansi.new( @md.opt.act[:color_state][:set], 'invert', 'Using XML Tidy', 'check document structure' ).colorize tell=SiSU_Screen::Ansi.new( @md.opt.act[:color_state][:set], 'invert', '', '' ) tell.grey_open end tidyfile='/dev/null' #don't want one or screen output, check for alternative flags tidy=SiSU_Env::SystemCall.new(@file,tidyfile) tidy.well_formed? tell.p_off unless @md.opt.act[:quiet][:set]==:on end end end |