You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Seahorse::Client::Plugins::OperationMethods OverviewDefines a helper method for each API operation that builds and sends the named request.
Helper MethodsThis plugin adds a helper method that lists the available API operations.
client.operation_names
Additionally, it adds a helper method for each operation. This helper handles building and sending the appropriate Request.
req = client.build_request(:api_operation_name, request_params)
resp = req.send_request
resp = client.api_operation_name(request_params)
Attribute Summary collapse
#add_handlers, #add_options, after_initialize, #before_initialize, before_initialize, option
Methods included from HandlerBuilder#handle, #handle_request, #handle_response
Instance Method Details #add_operation_helpers(client, operations) ⇒ Object38 39 40 41 42 43 44 45 46 47
# File 'aws-sdk-core/lib/seahorse/client/plugins/operation_methods.rb', line 38 def add_operation_helpers(client, operations) operations.each do |name| client.class.send(:define_method, name) do |*args, &block| params = args[0] || {} send_options = args[1] || {} build_request(name, params).send_request(send_options, &block) end end client.class.send(:define_method, :operation_names) { operations } end#after_initialize(client) ⇒ Object
28 29 30 31 32 33 34 35 36
# File 'aws-sdk-core/lib/seahorse/client/plugins/operation_methods.rb', line 28 def after_initialize(client) unless client.respond_to?(:operation_names) client.class.mutex.synchronize do unless client.respond_to?(:operation_names) add_operation_helpers(client, client.config.api.operation_names) end end end end
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4