Method: Station#initialize

Defined in:
lib/station.rb

#initialize(hash) ⇒ Station

Returns a new instance of Station.



4
5
6
7
8
9
10
# File 'lib/station.rb', line 4

def initialize hash
  @description = hash['StationDesc']
  @latitude    = hash['StationLatitude'].to_f
  @longitude   = hash['StationLongitude'].to_f
  @code        = hash['StationCode']
  @id          = hash['StationId'].to_i
end