Exception: ToiletTracker::Core::InvalidShift

Inherits:
ParseError show all
Defined in:
lib/toilet_tracker/core/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(shift_value) ⇒ InvalidShift

Returns a new instance of InvalidShift.



39
40
41
42
# File 'lib/toilet_tracker/core/errors.rb', line 39

def initialize(shift_value)
  @shift_value = shift_value
  super("Invalid shift value: #{shift_value.inspect} (must be between -12 and +12)")
end

Instance Attribute Details

#shift_valueObject (readonly)

Returns the value of attribute shift_value.



37
38
39
# File 'lib/toilet_tracker/core/errors.rb', line 37

def shift_value
  @shift_value
end