Sha256: 4a28f7e526637db6804b0790228ce03c24801a7b909ebe3f051ee0e4605481e0
Contents?: true
Size: 694 Bytes
Versions: 4
Compression:
Stored size: 694 Bytes
Contents
module Accuweather module Location class City attr_reader :id, :city, :state, :latitude, :longitude def initialize(id:, city:, state:, latitude:, longitude:) @id = id @city = city @state = state @latitude = latitude @longitude = longitude end def ==(other) id == other.id && city == other.city && state == other.state && latitude == other.latitude && longitude == other.longitude rescue NoMethodError false end def to_s "id: #{id}, city: #{city}, state: #{state}, latitude: #{latitude}, longitude: #{longitude}" end end end end
Version data entries
4 entries across 4 versions & 1 rubygems