Class: Excon::Middleware::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/excon/middlewares/base.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stack) ⇒ Base

Returns a new instance of Base.



11
12
13
# File 'lib/excon/middlewares/base.rb', line 11

def initialize(stack)
  @stack = stack
end

Class Method Details

.valid_parameter_keysObject

Returns the list of parameters that this middleware uses that are valid as arguments to ‘Connection#request` or `Connection#new`.



7
8
9
# File 'lib/excon/middlewares/base.rb', line 7

def self.valid_parameter_keys
  []
end

Instance Method Details

#error_call(datum) ⇒ Object



15
16
17
18
# File 'lib/excon/middlewares/base.rb', line 15

def error_call(datum)
  # do stuff
  @stack.error_call(datum)
end

#request_call(datum) ⇒ Object



20
21
22
23
# File 'lib/excon/middlewares/base.rb', line 20

def request_call(datum)
  # do stuff
  @stack.request_call(datum)
end

#response_call(datum) ⇒ Object



25
26
27
28
# File 'lib/excon/middlewares/base.rb', line 25

def response_call(datum)
  @stack.response_call(datum)
  # do stuff
end