Class: Saxerator::Builder::HashElement
- Inherits:
-
Hash
- Object
- Hash
- Saxerator::Builder::HashElement
- Defined in:
- lib/saxerator/builder/hash_element.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, attributes) ⇒ HashElement
constructor
A new instance of HashElement.
- #to_a ⇒ Object
Constructor Details
#initialize(name, attributes) ⇒ HashElement
Returns a new instance of HashElement.
9 10 11 12 |
# File 'lib/saxerator/builder/hash_element.rb', line 9 def initialize(name, attributes) self.name = name self.attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
6 7 8 |
# File 'lib/saxerator/builder/hash_element.rb', line 6 def attributes @attributes end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/saxerator/builder/hash_element.rb', line 7 def name @name end |
Instance Method Details
#to_a ⇒ Object
14 15 16 17 18 19 |
# File 'lib/saxerator/builder/hash_element.rb', line 14 def to_a array = ArrayElement.new array.name = name array.concat super array end |