class Accuweather::Conditions::Local

Attributes

city[R]
current_gmt_offset[R]
latitude[R]
longitude[R]
obs_daylight[R]
state[R]
time[R]
time_zone[R]
time_zone_abbreviation[R]

Public Class Methods

new(city:, state:, latitude:, longitude:, time:, time_zone:, obs_daylight:, current_gmt_offset:, time_zone_abbreviation:) click to toggle source
# File lib/accuweather/conditions/local.rb, line 6
def initialize(city:, state:, latitude:, longitude:, time:, time_zone:, obs_daylight:, current_gmt_offset:, time_zone_abbreviation:)
  @city = city
  @state = state
  @latitude = latitude
  @longitude = longitude
  @time = time
  @time_zone = time_zone
  @obs_daylight = obs_daylight
  @current_gmt_offset = current_gmt_offset
  @time_zone_abbreviation = time_zone_abbreviation
end

Public Instance Methods

==(other) click to toggle source
# File lib/accuweather/conditions/local.rb, line 18
def ==(other)
  city == other.city &&
    state == other.state &&
    latitude == other.latitude &&
    longitude == other.longitude &&
    time == other.time &&
    time_zone == other.time_zone &&
    obs_daylight == other.obs_daylight &&
    current_gmt_offset == other.current_gmt_offset &&
    time_zone_abbreviation == other.time_zone_abbreviation
rescue NoMethodError
  false
end
to_s() click to toggle source
# File lib/accuweather/conditions/local.rb, line 32
def to_s
  "city: #{city}, state: #{state}, latitude: #{latitude}, longitude: #{longitude}, time: #{time}, time_zone: #{time_zone}, obs_daylight: #{obs_daylight}, current_gmt_offset: #{current_gmt_offset}, time_zone_abbreviation: #{time_zone_abbreviation}"
end