Class: Moxml::Adapter::CustomizedLibxml::EntityReference

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ EntityReference

Returns a new instance of EntityReference.



9
10
11
# File 'lib/moxml/adapter/customized_libxml/entity_reference.rb', line 9

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



17
18
19
# File 'lib/moxml/adapter/customized_libxml/entity_reference.rb', line 17

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

#to_xmlObject



13
14
15
# File 'lib/moxml/adapter/customized_libxml/entity_reference.rb', line 13

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