class Ox::Node

The Node is the base class for all other in the Ox module.

Attributes

value[RW]

String value associated with the Node.

Public Class Methods

new(value) click to toggle source

Creates a new Node with the specified String value. @param [String] value string value for the Node

# File lib/ox/node.rb, line 10
def initialize(value)
  @value = value.to_s
end

Public Instance Methods

==(other)
Alias for: eql?
eql?(other) click to toggle source

Returns true if this Object and other are of the same type and have the equivalent value otherwise false is returned. @param [Object] other Object to compare self to.

# File lib/ox/node.rb, line 17
def eql?(other)
  return false if (other.nil? or self.class != other.class)
  other.value == self.value
end
Also aliased as: ==