Class: PagSeguro::Errors

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Enumerable
Defined in:
lib/pagseguro/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(response = nil) ⇒ Errors

Returns a new instance of Errors.



8
9
10
11
12
13
# File 'lib/pagseguro/errors.rb', line 8

def initialize(response = nil)
  @response = response
  @messages = []

  process(@response) if response
end

Instance Method Details

#add(response) ⇒ Object

Adds errors. Accepts a response.



17
18
19
# File 'lib/pagseguro/errors.rb', line 17

def add(response)
  process(response)
end