You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Seahorse::Client::Plugin
- Inherits:
-
Object
- Object
- Seahorse::Client::Plugin
- Extended by:
- HandlerBuilder
- Defined in:
- aws-sdk-core/lib/seahorse/client/plugin.rb
Direct Known Subclasses
Aws::Plugins::CSDConditionalSigning, Aws::Plugins::CSDSwitchToPost, Aws::Plugins::DynamoDBCRC32Validation, Aws::Plugins::DynamoDBExtendedRetries, Aws::Plugins::DynamoDBSimpleAttributes, Aws::Plugins::EC2CopyEncryptedSnapshot, Aws::Plugins::EndpointDiscovery, Aws::Plugins::EndpointPattern, Aws::Plugins::GlacierAccountId, Aws::Plugins::GlacierApiVersion, Aws::Plugins::GlacierChecksums, Aws::Plugins::GlobalConfiguration, Aws::Plugins::IdempotencyToken, Aws::Plugins::JsonvalueConverter, Aws::Plugins::Logging, Aws::Plugins::ParamConverter, Aws::Plugins::ParamValidator, Aws::Plugins::Protocols::EC2, Aws::Plugins::Protocols::JsonRpc, Aws::Plugins::Protocols::Query, Aws::Plugins::Protocols::RestJson, Aws::Plugins::Protocols::RestXml, Aws::Plugins::RDSCrossRegionCopying, Aws::Plugins::RegionalEndpoint, Aws::Plugins::RequestSigner, Aws::Plugins::ResponsePaging, Aws::Plugins::RetryErrors, Aws::Plugins::Route53IdFix, Aws::Plugins::S3Accelerate, Aws::Plugins::S3BucketDns, Aws::Plugins::S3ControlDns, Aws::Plugins::S3Expect100Continue, Aws::Plugins::S3GetBucketLocationFix, Aws::Plugins::S3IADRegionalEndpoint, Aws::Plugins::S3LocationConstraint, Aws::Plugins::S3Md5s, Aws::Plugins::S3Redirects, Aws::Plugins::S3SseCpk, Aws::Plugins::S3UrlEncodedKeys, Aws::Plugins::SQSMd5s, Aws::Plugins::STSRegionalEndpoints, Aws::Plugins::SWFReadTimeouts, Aws::Plugins::StubResponses, Aws::Plugins::UserAgent, Seahorse::Client::Plugins::ContentLength, Seahorse::Client::Plugins::Endpoint, Seahorse::Client::Plugins::Logging, Seahorse::Client::Plugins::NetHttp, Seahorse::Client::Plugins::OperationMethods, Seahorse::Client::Plugins::RaiseResponseErrors
Class Method Summary collapse
-
.after_initialize(&block) ⇒ Object
-
.before_initialize(&block) ⇒ Object
-
.option(name, default = nil, &block) ⇒ Object
Instance Method Summary collapse
-
#add_handlers(handlers, config) ⇒ void
-
#add_options(config) ⇒ void
-
#after_initialize(client) ⇒ void
-
#before_initialize(client_class, options) ⇒ void
Methods included from HandlerBuilder
handle, handle_request, handle_response
Class Method Details
.after_initialize(&block) ⇒ Object
53 54 55 |
# File 'aws-sdk-core/lib/seahorse/client/plugin.rb', line 53 def after_initialize(&block) after_initialize_hooks << block end |
.before_initialize(&block) ⇒ Object
49 50 51 |
# File 'aws-sdk-core/lib/seahorse/client/plugin.rb', line 49 def before_initialize(&block) before_initialize_hooks << block end |
.option(name, default = nil, &block) ⇒ Object
41 42 43 44 45 46 47 |
# File 'aws-sdk-core/lib/seahorse/client/plugin.rb', line 41 def option(name, default = nil, &block) if block_given? << [[name], block] else << [[name, default]] end end |
Instance Method Details
#add_handlers(handlers, config) ⇒ void
This method returns an undefined value.
18 19 20 |
# File 'aws-sdk-core/lib/seahorse/client/plugin.rb', line 18 def add_handlers(handlers, config) handlers.copy_from(self.class.handlers) end |
#add_options(config) ⇒ void
This method returns an undefined value.
9 10 11 12 13 |
# File 'aws-sdk-core/lib/seahorse/client/plugin.rb', line 9 def (config) self.class..each do |args, block| config.add_option(*args, &block) end end |
#after_initialize(client) ⇒ void
This method returns an undefined value.
33 34 35 36 37 |
# File 'aws-sdk-core/lib/seahorse/client/plugin.rb', line 33 def after_initialize(client) self.class.after_initialize_hooks.each do |block| block.call(client) end end |
#before_initialize(client_class, options) ⇒ void
This method returns an undefined value.
25 26 27 28 29 |
# File 'aws-sdk-core/lib/seahorse/client/plugin.rb', line 25 def before_initialize(client_class, ) self.class.before_initialize_hooks.each do |block| block.call(client_class, ) end end |