Exception: ChartMogul::Client::ValidationError
- Inherits:
-
StandardError
- Object
- StandardError
- ChartMogul::Client::ValidationError
- Defined in:
- lib/chart_mogul/client.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(result) ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(result) ⇒ ValidationError
Returns a new instance of ValidationError.
79 80 81 82 83 84 85 86 87 |
# File 'lib/chart_mogul/client.rb', line 79 def initialize(result) @body = result if result[:errors] @errors = result[:errors] super("validation errors for #{@errors.keys.join(', ')}") else super("validation errors #{@body}") end end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
77 78 79 |
# File 'lib/chart_mogul/client.rb', line 77 def body @body end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
76 77 78 |
# File 'lib/chart_mogul/client.rb', line 76 def errors @errors end |