You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Seahorse::Client::Handler

Inherits:
Object
  • Object
show all
Defined in:
aws-sdk-core/lib/seahorse/client/handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(handler = nil) ⇒ Handler

Returns a new instance of Handler.

Parameters:

  • handler (Handler) (defaults to: nil)

    (nil) The next handler in the stack that should be called from within the #call method. This value must only be nil for send handlers.



8
9
10
# File 'aws-sdk-core/lib/seahorse/client/handler.rb', line 8

def initialize(handler = nil)
  @handler = handler
end

Instance Attribute Details

#handlerHandler?

Returns:



13
14
15
# File 'aws-sdk-core/lib/seahorse/client/handler.rb', line 13

def handler
  @handler
end

Instance Method Details

#call(context) ⇒ Response

Parameters:

Returns:



17
18
19
# File 'aws-sdk-core/lib/seahorse/client/handler.rb', line 17

def call(context)
  @handler.call(context)
end

#inspectObject



21
22
23
# File 'aws-sdk-core/lib/seahorse/client/handler.rb', line 21

def inspect
  "#<#{self.class.name||'UnnamedHandler'} @handler=#{@handler.inspect}>"
end