Class: Moxml::Adapter::CustomizedOx::Attribute
- Defined in:
- lib/moxml/adapter/customized_ox/attribute.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
Attributes inherited from Ox::Node
Instance Method Summary collapse
- #expanded_name ⇒ Object
-
#initialize(attr_name, value, parent = nil) ⇒ Attribute
constructor
A new instance of Attribute.
Constructor Details
#initialize(attr_name, value, parent = nil) ⇒ Attribute
Returns a new instance of Attribute.
11 12 13 14 15 |
# File 'lib/moxml/adapter/customized_ox/attribute.rb', line 11 def initialize(attr_name, value, parent = nil) self.name = attr_name @parent = parent super(value) end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/moxml/adapter/customized_ox/attribute.rb', line 9 def name @name end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
9 10 11 |
# File 'lib/moxml/adapter/customized_ox/attribute.rb', line 9 def prefix @prefix end |
Instance Method Details
#expanded_name ⇒ Object
23 24 25 |
# File 'lib/moxml/adapter/customized_ox/attribute.rb', line 23 def [prefix, name].compact.join(":") end |