Exception: Theman::Agency::Error

Inherits:
Exception
  • Object
show all
Defined in:
lib/theman/agency.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, constant, message) ⇒ Error

Returns a new instance of Error.



185
186
187
188
189
# File 'lib/theman/agency.rb', line 185

def initialize(code, constant, message)
  @code = code
  @constant = constant
  @error, @context = message.split(/\n/)
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



183
184
185
# File 'lib/theman/agency.rb', line 183

def code
  @code
end

#constantObject

Returns the value of attribute constant.



183
184
185
# File 'lib/theman/agency.rb', line 183

def constant
  @constant
end

#contextObject

Returns the value of attribute context.



183
184
185
# File 'lib/theman/agency.rb', line 183

def context
  @context
end

#errorObject

Returns the value of attribute error.



183
184
185
# File 'lib/theman/agency.rb', line 183

def error
  @error
end

Instance Method Details

#to_sObject



191
192
193
# File 'lib/theman/agency.rb', line 191

def to_s
  @error
end