Class: Plurimath::XmlEngine::Oga::Wrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/plurimath/xml_engine/oga/wrapper.rb

Overview

Create API compatible with Ox, per Plurimath usage

Direct Known Subclasses

Node

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Wrapper

Returns a new instance of Wrapper.



6
7
8
# File 'lib/plurimath/xml_engine/oga/wrapper.rb', line 6

def initialize(value)
  @wrapped = value
end

Instance Method Details

#==(other) ⇒ Object



14
15
16
17
# File 'lib/plurimath/xml_engine/oga/wrapper.rb', line 14

def ==(other)
  self.class == other.class &&
    @wrapped.inspect == other.unwrap.inspect
end

#unwrapObject



10
11
12
# File 'lib/plurimath/xml_engine/oga/wrapper.rb', line 10

def unwrap
  @wrapped
end