Class: N::XmlBuilder
- Includes:
- XmlBuilderMixin
- Defined in:
- lib/nitro/builders/xml.rb
Overview
A class that encapsulats the XML generation functionality. Utilizes duck typing to redirect output to a target buffer.
Instance Attribute Summary collapse
-
#target ⇒ Object
The target receives the generated xml, should respond_to :<<.
Instance Method Summary collapse
- #<<(str) ⇒ Object
-
#initialize(target = '') ⇒ XmlBuilder
constructor
A new instance of XmlBuilder.
- #to_s ⇒ Object
Methods included from XmlBuilderMixin
#comment, #end_tag, #method_missing, #start_tag, #text
Constructor Details
#initialize(target = '') ⇒ XmlBuilder
Returns a new instance of XmlBuilder.
96 97 98 |
# File 'lib/nitro/builders/xml.rb', line 96 def initialize(target = '') @target = target end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class N::XmlBuilderMixin
Instance Attribute Details
#target ⇒ Object
The target receives the generated xml, should respond_to :<<
94 95 96 |
# File 'lib/nitro/builders/xml.rb', line 94 def target @target end |