Module: Liner::Equalizable

Defined in:
lib/liner/equalizable.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ true, false

Test equality between a liner class instance and another object

Parameters:

  • other (Object)

Returns:

  • (true, false)


7
8
9
10
# File 'lib/liner/equalizable.rb', line 7

def ==(other)
  return false unless other.class == self.class
  liner == other.liner
end

#eql?(other) ⇒ true, false

Test equality between a liner class instance and another object

Parameters:

  • other (Object)

Returns:

  • (true, false)


15
16
17
18
# File 'lib/liner/equalizable.rb', line 15

def eql?(other)
  return false unless other.class == self.class
  liner.eql?(other.liner)
end