Exception: ActionKitRest::Response::ValidationError
- Inherits:
-
StandardError
- Object
- StandardError
- ActionKitRest::Response::ValidationError
- Defined in:
- lib/action_kit_rest/response/validation_error.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(params) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #to_s ⇒ Object
Constructor Details
#initialize(params) ⇒ ValidationError
Returns a new instance of ValidationError.
6 7 8 9 10 11 |
# File 'lib/action_kit_rest/response/validation_error.rb', line 6 def initialize(params) self.url = params[:url] self.body = params[:body] self.errors = JSON.parse(params[:body])['errors'] super() end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
4 5 6 |
# File 'lib/action_kit_rest/response/validation_error.rb', line 4 def body @body end |
#errors ⇒ Object
Returns the value of attribute errors.
4 5 6 |
# File 'lib/action_kit_rest/response/validation_error.rb', line 4 def errors @errors end |
#url ⇒ Object
Returns the value of attribute url.
4 5 6 |
# File 'lib/action_kit_rest/response/validation_error.rb', line 4 def url @url end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/action_kit_rest/response/validation_error.rb', line 13 def to_s "#{super()} \n url: #{url} \n body: #{body} \n errors: #{errors}" end |