Class: Moxml::Adapter::CustomizedOx::Attribute
- Inherits:
-
Ox::Node
- Object
- Ox::Node
- 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.
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.
9 10 11 12 13 |
# File 'lib/moxml/adapter/customized_ox/attribute.rb', line 9 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.
7 8 9 |
# File 'lib/moxml/adapter/customized_ox/attribute.rb', line 7 def name @name end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
7 8 9 |
# File 'lib/moxml/adapter/customized_ox/attribute.rb', line 7 def prefix @prefix end |
Instance Method Details
#expanded_name ⇒ Object
21 22 23 |
# File 'lib/moxml/adapter/customized_ox/attribute.rb', line 21 def [prefix, name].compact.join(":") end |