Class: Barometer::Response::Prediction

Inherits:
Object
  • Object
show all
Defined in:
lib/barometer/response/prediction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dateObject

Returns the value of attribute date



17
18
19
# File 'lib/barometer/response/prediction.rb', line 17

def date
  @date
end

Instance Method Details

#covers?(time) ⇒ Boolean

Raises:

  • (ArgumentError)


35
36
37
38
# File 'lib/barometer/response/prediction.rb', line 35

def covers?(time)
  raise ArgumentError unless time.is_a?(Time)
  time >= @starts_at && time <= @ends_at
end