Sha256: 5c049c166779d2c98fd8f462f0c39f909de7243116ac8c6e3e131125c3a86aae

Contents?: true

Size: 709 Bytes

Versions: 1

Compression:

Stored size: 709 Bytes

Contents

module Forecastr
  class Forecast

    attr_reader :city, :longitude, :latitude, :temperature,
                :pressure, :humidity, :min_temperature,
                :max_temperature, :clouds, :wind

    def initialize(data)
      @city = data.city
      @longitude = data.longitude
      @latitude = data.latitude
      @temperature = Forecastr::Temperature.new(data.temperature)
      @pressure = data.pressure
      @humidity = data.humidity
      @min_temperature = Forecastr::Temperature.new(data.min_temperature)
      @max_temperature = Forecastr::Temperature.new(data.max_temperature)
      @clouds = data.clouds
      @wind = Forecastr::Wind.new(data.wind_speed, data.wind_angle)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
forecastr-0.1.3 lib/forecastr/forecast.rb