Class: Debug::Inspector

Inherits:
Object
  • Object
show all
Defined in:
lib/dpd_api/debug/inspector.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Inspector

Returns a new instance of Inspector.



5
6
7
# File 'lib/dpd_api/debug/inspector.rb', line 5

def initialize(client)
  client.add_observer(self)
end

Instance Method Details

#update(url, request, response, result) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/dpd_api/debug/inspector.rb', line 9

def update(url, request, response, result)
  p '--------------------------'
  p "SENDING REQUEST TO: #{url}"
  p "WITH PARAMS:        #{request}"
  p "GETTING RESPONSE:   #{response}"
  p "RESULT:             #{result}"
  p '--------------------------'
end