Class: Saxerator::Builder::StringElement
- Inherits:
-
String
- Object
- String
- Saxerator::Builder::StringElement
- Defined in:
- lib/saxerator/builder/string_element.rb
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(str, name, attributes) ⇒ StringElement
constructor
A new instance of StringElement.
- #to_a ⇒ Object
Constructor Details
#initialize(str, name, attributes) ⇒ StringElement
Returns a new instance of StringElement.
9 10 11 12 13 |
# File 'lib/saxerator/builder/string_element.rb', line 9 def initialize(str, name, attributes) self.name = name self.attributes = attributes super(str) end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
6 7 8 |
# File 'lib/saxerator/builder/string_element.rb', line 6 def attributes @attributes end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/saxerator/builder/string_element.rb', line 7 def name @name end |
Instance Method Details
#to_a ⇒ Object
15 16 17 18 19 20 |
# File 'lib/saxerator/builder/string_element.rb', line 15 def to_a array = ArrayElement.new array << self array.name = name array end |