Class: Seahorse::Client::Plugin
- Inherits:
-
Object
- Object
- Seahorse::Client::Plugin
- Extended by:
- HandlerBuilder
- Defined in:
- gems/aws-sdk-core/lib/seahorse/client/plugin.rb
Direct Known Subclasses
Aws::CloudSearchDomain::Plugins::ConditionalSigning, Aws::CloudSearchDomain::Plugins::SwitchToPost, Aws::DocDB::Plugins::CrossRegionCopying, Aws::DynamoDB::Plugins::CRC32Validation, Aws::DynamoDB::Plugins::ExtendedRetries, Aws::DynamoDB::Plugins::SimpleAttributes, Aws::DynamoDBStreams::Plugins::SimpleAttributes, Aws::EventBridge::Plugins::MultiRegionEndpoint, Aws::FinSpaceData::Plugins::ContentType, Aws::Finspace::Plugins::ContentType, Aws::Glacier::Plugins::AccountId, Aws::Neptune::Plugins::CrossRegionCopying, Aws::Plugins::ApiKey, Aws::RDS::Plugins::CrossRegionCopying, Aws::S3::Plugins::Accelerate, Aws::S3::Plugins::BucketDns, Aws::S3::Plugins::Expect100Continue, Aws::S3::Plugins::GetBucketLocationFix, Aws::S3::Plugins::IADRegionalEndpoint, Aws::S3::Plugins::LocationConstraint, Aws::S3::Plugins::ObjectLambdaEndpoint, Aws::S3::Plugins::Redirects, Aws::S3::Plugins::SkipWholeMultipartGetChecksums, Aws::S3::Plugins::SseCpk, Aws::S3::Plugins::UrlEncodedKeys, Aws::SQS::Plugins::Md5s, Aws::STS::Plugins::STSRegionalEndpoints, Seahorse::Client::Plugins::ContentLength, Seahorse::Client::Plugins::Endpoint, Seahorse::Client::Plugins::H2, 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, options = {}, &block) ⇒ void
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
71 72 73 |
# File 'gems/aws-sdk-core/lib/seahorse/client/plugin.rb', line 71 def after_initialize(&block) after_initialize_hooks << block end |
.before_initialize(&block) ⇒ Object
67 68 69 |
# File 'gems/aws-sdk-core/lib/seahorse/client/plugin.rb', line 67 def before_initialize(&block) before_initialize_hooks << block end |
.option(name, options = {}, &block) ⇒ void
This method returns an undefined value.
54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'gems/aws-sdk-core/lib/seahorse/client/plugin.rb', line 54 def option(name, default = nil, = {}, &block) # For backwards-compat reasons, the default value can be passed as 2nd # positional argument (before the options hash) or as the `:default` option # in the options hash. if default.is_a? Hash = default else [:default] = default end [:default_block] = block if block_given? self. << PluginOption.new(name, ) end |
Instance Method Details
#add_handlers(handlers, config) ⇒ void
This method returns an undefined value.
24 25 26 |
# File 'gems/aws-sdk-core/lib/seahorse/client/plugin.rb', line 24 def add_handlers(handlers, config) handlers.copy_from(self.class.handlers) end |
#add_options(config) ⇒ void
This method returns an undefined value.
11 12 13 14 15 16 17 18 19 |
# File 'gems/aws-sdk-core/lib/seahorse/client/plugin.rb', line 11 def (config) self.class..each do |option| if option.default_block config.add_option(option.name, &option.default_block) else config.add_option(option.name, option.default) end end end |
#after_initialize(client) ⇒ void
This method returns an undefined value.
39 40 41 42 43 |
# File 'gems/aws-sdk-core/lib/seahorse/client/plugin.rb', line 39 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.
31 32 33 34 35 |
# File 'gems/aws-sdk-core/lib/seahorse/client/plugin.rb', line 31 def before_initialize(client_class, ) self.class.before_initialize_hooks.each do |block| block.call(client_class, ) end end |