Class: Moxml::Adapter::CustomizedOx::Attribute

Inherits:
Ox::Node
  • Object
show all
Defined in:
lib/moxml/adapter/customized_ox/attribute.rb

Instance Attribute Summary collapse

Attributes inherited from Ox::Node

#parent

Instance Method Summary collapse

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

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/moxml/adapter/customized_ox/attribute.rb', line 9

def name
  @name
end

#prefixObject (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_nameObject



23
24
25
# File 'lib/moxml/adapter/customized_ox/attribute.rb', line 23

def expanded_name
  [prefix, name].compact.join(":")
end