Class: Moxml::Adapter::CustomizedOx::EntityReference

Inherits:
Object
  • Object
show all
Defined in:
lib/moxml/adapter/customized_ox/entity_reference.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ EntityReference

Returns a new instance of EntityReference.



10
11
12
13
# File 'lib/moxml/adapter/customized_ox/entity_reference.rb', line 10

def initialize(name)
  @name = name
  @parent = nil
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#parentObject

Returns the value of attribute parent.



8
9
10
# File 'lib/moxml/adapter/customized_ox/entity_reference.rb', line 8

def parent
  @parent
end

Instance Method Details

#==(other) ⇒ Object



19
20
21
# File 'lib/moxml/adapter/customized_ox/entity_reference.rb', line 19

def ==(other)
  other.is_a?(self.class) && @name == other.name
end

#to_xmlObject



15
16
17
# File 'lib/moxml/adapter/customized_ox/entity_reference.rb', line 15

def to_xml
  "&#{@name};"
end