Exception: Exceptions::Simple
- Defined in:
- lib/exceptions/simple.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
return the error status.
Attributes inherited from Base
Instance Method Summary collapse
-
#error ⇒ String
for standard errors this method build a hash.
-
#message ⇒ String
return the error message.
Methods inherited from Base
build, #initialize, #model?, #simple?
Constructor Details
This class inherits a constructor from Exceptions::Base
Instance Attribute Details
#status ⇒ Object
return the error status
26 27 28 |
# File 'lib/exceptions/simple.rb', line 26 def status @status end |
Instance Method Details
#error ⇒ String
for standard errors this method build a hash
9 10 11 12 13 14 15 16 17 |
# File 'lib/exceptions/simple.rb', line 9 def error { error: { message: self.object[:message], full_message: "#{self.object[:field]} #{self.object[:message]} ", field: self.object[:field] } } end |
#message ⇒ String
return the error message
21 22 23 |
# File 'lib/exceptions/simple.rb', line 21 def self.object[:message] end |