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