Exception: ActsAsIcontact::SaveError
- Inherits:
-
StandardError
- Object
- StandardError
- ActsAsIcontact::SaveError
- Defined in:
- lib/acts_as_icontact/exceptions.rb
Overview
Thrown when a resource calls save! and fails. Contains the .errors
array from the resource.
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(errors = []) ⇒ SaveError
constructor
A new instance of SaveError.
- #message ⇒ Object (also: #error)
Constructor Details
#initialize(errors = []) ⇒ SaveError
Returns a new instance of SaveError.
19 20 21 |
# File 'lib/acts_as_icontact/exceptions.rb', line 19 def initialize(errors = []) @errors = errors end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
17 18 19 |
# File 'lib/acts_as_icontact/exceptions.rb', line 17 def errors @errors end |
Instance Method Details
#message ⇒ Object Also known as: error
23 24 25 |
# File 'lib/acts_as_icontact/exceptions.rb', line 23 def errors.first end |