Ticket #42 (closed enhancement: worksforme)

Opened 2 years ago

Last modified 2 years ago

Setting markup output options at instance level

Reported by: jacen Owned by: somebody
Priority: trivial Milestone: 0.5
Component: lib Version: 0.5
Keywords: indent xml markup output option Cc:

Description

I would like to suggest an instance method for setting output options like :indent. So you don't need to create a new Builder instance when you want to change some settings. For example: Setting the :indent to 2 results in readable markup, but it bites you when creating a form using a textarea where the value is enclosed by the start-/endtag and not set by an attribute. Due to the indent you will get some bogus chars in your textarea - this could be prevented by setting the indent to 0 temporarily.

Change History

Changed 2 years ago by tec

You can already set options at the instance level using plain old instance variables. That won't help you much in this case though - if you need finer control over the indentation you can use @builder.instance_eval { @indent = 0 }.

Changed 2 years ago by tec

  • status changed from new to closed
  • resolution set to worksforme
Note: See TracTickets for help on using tickets.