Method: Functional::Tuple#eql?

Defined in:
lib/functional/tuple.rb

#eql?(other) ⇒ Boolean Also known as: ==

Compares this object and other for equality. A tuple is ‘eql?` to other when other is a tuple or an array-like object (any object that responds to `to_a`) and the two objects have identical values in the same foxed order.

Parameters:

  • other (Object)

    the other tuple to compare for equality

Returns:

  • (Boolean)

    true when equal else false



196
197
198
# File 'lib/functional/tuple.rb', line 196

def eql?(other)
  @data == other.to_a
end