class Ox::Node

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



String value associated with the Node.

Public Class Methods

new(value) click to toggle source

Creates a new Node with the specified String value.

  • value [String] string value for the Node

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

Public Instance Methods

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.

  • other [Object] 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
Also aliased as: ==