Exception: Timeprice::DateOutOfRange

Inherits:
Error
  • Object
show all
Defined in:
lib/timeprice/errors.rb

Overview

Raised when a requested date falls outside the bundled data range.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(date, range) ⇒ DateOutOfRange

Returns a new instance of DateOutOfRange.



34
35
36
37
38
# File 'lib/timeprice/errors.rb', line 34

def initialize(date, range)
  @date = date
  @range = range
  super("Date #{date.inspect} out of supported range #{range.inspect}")
end

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



32
33
34
# File 'lib/timeprice/errors.rb', line 32

def date
  @date
end

#rangeObject (readonly)

Returns the value of attribute range.



32
33
34
# File 'lib/timeprice/errors.rb', line 32

def range
  @range
end