Sha256: 6f76ed2f72770b2e0094eb563aff1d420242655d0f293979a45003fb4415034c

Contents?: true

Size: 681 Bytes

Versions: 54

Compression:

Stored size: 681 Bytes

Contents

module Ox
  # The Node is the base class for all other in the Ox module.
  class Node
    # String value associated with the Node.
    attr_accessor :value
    
    # Creates a new Node with the specified String value.
    # - +value+ [String] string value for the Node
    def initialize(value)
      @value = value.to_s
    end

    # 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.
    def eql?(other)
      return false if (other.nil? or self.class != other.class)
      other.value == self.value
    end
    alias == eql?

  end # Node
end # Ox

Version data entries

54 entries across 54 versions & 2 rubygems

Version Path
ox-2.14.14 lib/ox/node.rb
ox-2.14.13 lib/ox/node.rb
ox-2.14.12 lib/ox/node.rb
ox-2.14.11 lib/ox/node.rb
ox-2.14.10 lib/ox/node.rb
ox-2.14.9 lib/ox/node.rb
ox-2.14.8 lib/ox/node.rb
ox-2.14.7 lib/ox/node.rb
ox-2.14.6 lib/ox/node.rb
ox-2.14.5 lib/ox/node.rb
ox-2.14.4 lib/ox/node.rb
ox-2.14.3 lib/ox/node.rb
ox-2.14.2 lib/ox/node.rb
ox-2.14.1 lib/ox/node.rb
ox-2.14.0 lib/ox/node.rb
ox-2.13.4 lib/ox/node.rb
ox-2.13.3 lib/ox/node.rb
ox-2.13.2 lib/ox/node.rb
ox-2.13.1 lib/ox/node.rb
ox-2.12.1 lib/ox/node.rb