Exception: Restorm::Errors::ResourceInvalid
- Inherits:
-
StandardError
- Object
- StandardError
- Restorm::Errors::ResourceInvalid
- Defined in:
- lib/restorm/errors.rb
Instance Attribute Summary collapse
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
-
#initialize(resource) ⇒ ResourceInvalid
constructor
A new instance of ResourceInvalid.
Constructor Details
#initialize(resource) ⇒ ResourceInvalid
Returns a new instance of ResourceInvalid.
22 23 24 25 26 |
# File 'lib/restorm/errors.rb', line 22 def initialize(resource) @resource = resource errors = @resource.response_errors.join(", ") super("Remote validation failed: #{errors}") end |
Instance Attribute Details
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
21 22 23 |
# File 'lib/restorm/errors.rb', line 21 def resource @resource end |