Class: SiSU_SimpleXML_ModelSax::Convert::Tidy
- Inherits:
-
Object
- Object
- SiSU_SimpleXML_ModelSax::Convert::Tidy
- Defined in:
- lib/sisu/sst_to_s_xml_sax.rb
Instance Method Summary collapse
-
#initialize(md, dir) ⇒ Tidy
constructor
A new instance of Tidy.
- #xml ⇒ Object
Constructor Details
#initialize(md, dir) ⇒ Tidy
Returns a new instance of Tidy.
438 439 440 441 |
# File 'lib/sisu/sst_to_s_xml_sax.rb', line 438 def initialize(md,dir) @md,@env=md,dir @prog=SiSU_Env::InfoProgram.new end |
Instance Method Details
#xml ⇒ Object
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 |
# File 'lib/sisu/sst_to_s_xml_sax.rb', line 442 def xml if @prog.tidy !=false #note values can be other than true if (@md.opt.act[:verbose_plus][:set]==:on \ || @md.opt.act[:maintenance][:set]==:on) SiSU_Screen::Ansi.new( @md.opt.act[:color_state][:set], 'invert', 'Using XML Tidy', 'check document structure' ).colorize unless @md.opt.act[:quiet][:set]==:on SiSU_Screen::Ansi.new( @md.opt.act[:color_state][:set], '', '', 'check document structure' ) tell.grey_open unless @md.opt.act[:quiet][:set]==:on tidyfile='/dev/null' #don't want one or screen output, check for alternative flags tidy =SiSU_Env::SystemCall.new("#{Dir.pwd}/#{@md.fn[:sxs]}",tidyfile) tidy.well_formed? tell.p_off unless @md.opt.act[:quiet][:set]==:on end end end |