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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/moxml/adapter/customized_ox/attribute.rb', line 7

def name
  @name
end

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



21
22
23
# File 'lib/moxml/adapter/customized_ox/attribute.rb', line 21

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