Sha256: 05a358bdf614b625aaee7f4bfab12e67b22e8610b33f1942a3e33c727ff70e5a

Contents?: true

Size: 820 Bytes

Versions: 8

Compression:

Stored size: 820 Bytes

Contents

require 'virtus'

module Barometer
  module Response
    class Current
      include Virtus.model

      attribute :temperature, Data::Attribute::Temperature
      attribute :dew_point, Data::Attribute::Temperature
      attribute :heat_index, Data::Attribute::Temperature
      attribute :wind_chill, Data::Attribute::Temperature
      attribute :wind, Data::Attribute::Vector
      attribute :pressure, Data::Attribute::Pressure
      attribute :visibility, Data::Attribute::Distance
      attribute :humidity, Data::Attribute::Float
      attribute :sun, Data::Attribute::Sun
      attribute :observed_at, Data::Attribute::Time
      attribute :stale_at, Data::Attribute::Time
      attribute :icon, String
      attribute :condition, String

      def complete?
        !temperature.nil?
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
barometer-0.9.7 lib/barometer/response/current.rb
barometer-0.9.6 lib/barometer/response/current.rb
barometer-0.9.5 lib/barometer/response/current.rb
barometer-0.9.4 lib/barometer/response/current.rb
barometer-0.9.3 lib/barometer/response/current.rb
barometer-0.9.2 lib/barometer/response/current.rb
barometer-0.9.1 lib/barometer/response/current.rb
barometer-0.9.0 lib/barometer/response/current.rb