Sha256: ecb6f929a95e5115fee1db4f41b47a52959f85e6d0c329486a2465b13bb63ae8

Contents?: true

Size: 365 Bytes

Versions: 5

Compression:

Stored size: 365 Bytes

Contents

class Station
  attr_reader :description, :code, :id

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

  def location
    [@longitude,@latitude]
  end

  alias :name :description
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ierail-0.3.5 lib/station.rb
ierail-0.3.4 lib/station.rb
ierail-0.3.2 lib/station.rb
ierail-0.3 lib/station.rb
ierail-0.2 lib/station.rb