Exception: Handwritingio::Errors

Inherits:
RuntimeError
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/handwritingio.rb

Overview

Errors class for errors raised by the API

Contains one or more Error

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Errors

:nodoc:



215
216
217
218
# File 'lib/handwritingio.rb', line 215

def initialize(response) #:nodoc:
  @response = response
  @parsed = JSON.parse(response.body)['errors'].map{ |e| Error.new(e) }
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



213
214
215
# File 'lib/handwritingio.rb', line 213

def response
  @response
end

Instance Method Details

#inspectObject

:nodoc:



220
221
222
# File 'lib/handwritingio.rb', line 220

def inspect #:nodoc:
  "#<#{self.class.name} (#{self.count})>"
end