Method: Object#eq

Defined in:
lib/multiarray.rb

#eq(other) ⇒ FalseClass, ...

Element-wise equal operator

The method calls self == other unless other is of type Hornetseye::Node. In that case an element-wise comparison using Hornetseye::Node#eq is performed after coercion.

See Also:



136
137
138
139
140
141
142
143
# File 'lib/multiarray.rb', line 136

def eq( other )
  unless other.is_a? Hornetseye::Node
    self == other
  else
    x, y = other.coerce self
    x.eq y
  end
end