Sha256: 0ba7a432165c58bc31b7fd39e4ebfed8598df9efdd1f1f6ddb8118e42567c18c
Contents?: true
Size: 608 Bytes
Versions: 14
Compression:
Stored size: 608 Bytes
Contents
module Barometer # # A simple Location class # # Used to store location information about the station that # gave the measurement data for a weather query, or the location # that was queried # class Data::Location attr_accessor :id, :name, :city attr_accessor :state_name, :state_code, :country, :country_code, :zip_code attr_accessor :latitude, :longitude def coordinates [@latitude, @longitude].join(',') end def to_s [@name, @city, @state_name || @state_cocde, @country || @country_code].compact.join(', ') end end end
Version data entries
14 entries across 14 versions & 2 rubygems