Sha256: 19395ff0fc40c075909b8a75c454a61f31d0f04652cf5b8672fa988403b29195

Contents?: true

Size: 474 Bytes

Versions: 8

Compression:

Stored size: 474 Bytes

Contents

module Barometer
  module Data
    class Location < Coordinates
      attribute :id, String
      attribute :name, String
      attribute :city, String
      attribute :state_name, String
      attribute :state_code, String
      attribute :country, String
      attribute :country_code, String
      attribute :zip_code, String

      def to_s
        [name, city, state_name || state_code,
          country || country_code].compact.join(', ')
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
barometer-0.9.7 lib/barometer/data/location.rb
barometer-0.9.6 lib/barometer/data/location.rb
barometer-0.9.5 lib/barometer/data/location.rb
barometer-0.9.4 lib/barometer/data/location.rb
barometer-0.9.3 lib/barometer/data/location.rb
barometer-0.9.2 lib/barometer/data/location.rb
barometer-0.9.1 lib/barometer/data/location.rb
barometer-0.9.0 lib/barometer/data/location.rb