Sha256: 96f2a2af3eae40954861959e16190990acd48e28f0199ddebf114c504a732cb8
Contents?: true
Size: 759 Bytes
Versions: 2
Compression:
Stored size: 759 Bytes
Contents
module Weather class Units FARENHEIT = 'f' CELSIUS = 'c' # the unit in which temperature is measured # e.g. F for Farenheit, and C for Celsius attr_reader :temperature # the unit in which distance is measured # e.g. mi for miles, and km for kilometers attr_reader :distance # the unit in which pressure is measured # e.g in for inches, and cm for centimeters attr_reader :pressure # the unit in which speed is measured # e.g. mph for miles per hour, and kph for kilometers per hour attr_reader :speed def initialize payload @temperature = payload[:temperature] @distance = payload[:distance] @pressure = payload[:pressure] @speed = payload[:speed] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
weather-api-1.1.1 | lib/weather-api/units.rb |
weather-api-1.1.0 | lib/weather-api/units.rb |