Class: Saxerator::Builder::StringElement

Inherits:
String
  • Object
show all
Defined in:
lib/saxerator/builder/string_element.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attributesObject

Returns the value of attribute attributes.



7
8
9
# File 'lib/saxerator/builder/string_element.rb', line 7

def attributes
  @attributes
end

#nameObject

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_aObject



16
17
18
# File 'lib/saxerator/builder/string_element.rb', line 16

def to_a
  ArrayElement.new(self, name)
end