Class: Barometer::WeatherService::WeatherBug::Response::TimeHelper
- Inherits:
-
Object
- Object
- Barometer::WeatherService::WeatherBug::Response::TimeHelper
- Defined in:
- lib/barometer/weather_services/weather_bug/response/time_helper.rb
Instance Method Summary collapse
-
#initialize(payload, timezone) ⇒ TimeHelper
constructor
A new instance of TimeHelper.
- #parse(key) ⇒ Object
Constructor Details
#initialize(payload, timezone) ⇒ TimeHelper
Returns a new instance of TimeHelper.
6 7 8 9 |
# File 'lib/barometer/weather_services/weather_bug/response/time_helper.rb', line 6 def initialize(payload, timezone) @payload = payload @timezone = timezone end |
Instance Method Details
#parse(key) ⇒ Object
11 12 13 14 |
# File 'lib/barometer/weather_services/weather_bug/response/time_helper.rb', line 11 def parse(key) return unless local_time(key) timezone.local_to_utc(local_time(key)) end |