Class: Keyremac::Raw
- Inherits:
-
Object
- Object
- Keyremac::Raw
- Includes:
- Container
- Defined in:
- lib/keyremac/dump.rb,
lib/keyremac/base.rb
Overview
container
Instance Attribute Summary
Attributes included from Container
container collapse
-
#initialize(tag, children = []) ⇒ Raw
constructor
A new instance of Raw.
Instance Method Summary collapse
Methods included from Container
Constructor Details
#initialize(tag, children = []) ⇒ Raw
Returns a new instance of Raw.
73 74 75 76 |
# File 'lib/keyremac/base.rb', line 73 def initialize(tag, children = []) @tag = tag @children = children end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Keyremac::Container
Instance Method Details
#dump(xml) ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/keyremac/dump.rb', line 64 def dump(xml) if @children.class == String xml.tag! @tag, @children else xml.tag! @tag do @children.each { |child| child.dump xml } end end end |