class NTable::IndexWrapper

Use one of these in a coordinate to force the coordinate to be treated as an index rather than a label.

Attributes

to_i[R]

Retrieve the actual index

value[R]

Retrieve the actual index

Public Class Methods

new(val_) click to toggle source

Create an IndexWrapper with the given integer index

# File lib/ntable/index_wrapper.rb, line 48
def initialize(val_)
  @value = val_.to_i
end

Public Instance Methods

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

Standard equality checker

# File lib/ntable/index_wrapper.rb, line 55
def eql?(rhs_)
  rhs_.is_a?(IndexWrapper) && @value == @rhs_.value
end
Also aliased as: ==
hash() click to toggle source

Standard hash value

# File lib/ntable/index_wrapper.rb, line 63
def hash
  @value.hash
end