Sha256: bb2e3487161c7f3312a7e0d9884b81442a675aca113ff464064bf27061f5d6f9

Contents?: true

Size: 357 Bytes

Versions: 3

Compression:

Stored size: 357 Bytes

Contents

module Weather
  class Astronomy
    # a Time object containing the sunrise time for a location
    attr_reader :sunrise

    # a Time object containing the sunset time for a location
    attr_reader :sunset

    def initialize(payload)
      @sunrise = Utils.parse_time payload[:sunrise]
      @sunset = Utils.parse_time payload[:sunset]
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
weather-api-1.4.0 lib/weather-api/astronomy.rb
weather-api-1.3.0 lib/weather-api/astronomy.rb
weather-api-1.2.0 lib/weather-api/astronomy.rb