Sha256: 1db9b77d67921e96f784095d487644cb17baf104d43c229cd22ec78ffc1097e7
Contents?: true
Size: 370 Bytes
Versions: 1
Compression:
Stored size: 370 Bytes
Contents
module WillItRain class DataPoint # percentage refers to likelihood of precipitation attr_accessor :percentage, :summary def initialize(data_point) self.percentage = (100 * data_point.precipProbability).round(2) self.summary = data_point.summary end def surpasses_threshold?(threshold) percentage >= threshold end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
will_it_rain-0.1.0 | lib/will_it_rain/data_point.rb |