jimweirich / builder

Provide a simple way to create XML markup and data structures.
http://builder.rubyforge.org
MIT License
361 stars 103 forks source link

"Instruct!" does not work #61

Open ghost opened 6 years ago

ghost commented 6 years ago

Step by step:

[2] pry(main)> require 'builder' => true [3] pry(main)> xml = Builder::XmlMarkup.new => [4] pry(main)> xml.instruct! => nil

xml.instruct! always returns nil, independently of the parameters passed to it.

i4pg commented 1 year ago

Step by step:

[2] pry(main)> require 'builder' => true [3] pry(main)> xml = Builder::XmlMarkup.new => [4] pry(main)> xml.instruct! => nil

xml.instruct! always returns nil, independently of the parameters passed to it.

You've to pass target indent args

xml = Builder::XmlMarkup.new(target: $stdout, indent: 2)