Sha256: 9d609f4bd845015336ade8ddee19a547e96d4971b5ddb7a4866ced3f88993db7
Contents?: true
Size: 380 Bytes
Versions: 2
Compression:
Stored size: 380 Bytes
Contents
class Station attr_reader :description, :code, :id 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 def location [@longitude,@latitude] end alias :name :description end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ierail-0.4.1 | lib/station.rb |
ierail-0.4.0 | lib/station.rb |