Exception: TodaysPlan::TodaysPlanError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/todays_plan/errors.rb

Overview

Internal: Base class for TodaysPlan errors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message, resolve) ⇒ TodaysPlanError

Internal: Initialize a error with proper attributes.

code - The Integer code (e.g. 1501). message - The String message, describing the error. resolve - The String description how to fix the error.



14
15
16
17
18
19
# File 'lib/todays_plan/errors.rb', line 14

def initialize(code, message, resolve)
  @code = code
  @resolve = resolve

  super "Code #{@code}: #{message}. #{resolve}"
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



7
8
9
# File 'lib/todays_plan/errors.rb', line 7

def code
  @code
end

#resolveObject (readonly)

Returns the value of attribute resolve.



7
8
9
# File 'lib/todays_plan/errors.rb', line 7

def resolve
  @resolve
end