Module: RailwayJp::Equality

Included in:
Line, Station
Defined in:
lib/railway_jp/equality.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



11
12
13
# File 'lib/railway_jp/equality.rb', line 11

def ==(other)
  id == other.id
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/railway_jp/equality.rb', line 7

def eql?(other)
  self == other
end

#hashObject



3
4
5
# File 'lib/railway_jp/equality.rb', line 3

def hash
  id.hash
end