Class: Cb::Responses::Errors

Inherits:
Object
  • Object
show all
Defined in:
lib/cb/responses/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_response_hash, raise_on_error = true) ⇒ Errors

Returns a new instance of Errors.



7
8
9
10
11
# File 'lib/cb/responses/errors.rb', line 7

def initialize(raw_response_hash, raise_on_error = true)
  @response     = raw_response_hash
  @should_raise = raise_on_error
  @parsed       = parsed_errors
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object (private)



41
42
43
# File 'lib/cb/responses/errors.rb', line 41

def method_missing(method, *args, &block)
  parsed.send(method, *args, &block)
end

Instance Attribute Details

#parsedObject (readonly)

Returns the value of attribute parsed.



5
6
7
# File 'lib/cb/responses/errors.rb', line 5

def parsed
  @parsed
end