Module: CloudConfig::Providers::ClassMethods
- Defined in:
- lib/cloud-config/providers.rb
Overview
Class methods for CloudConfig::Providers
Instance Attribute Summary collapse
- #Provider configurations(configurations) ⇒ Hash<Symbol,ProviderConfig> readonly
-
#providers ⇒ Object
readonly
Returns the value of attribute providers.
Instance Method Summary collapse
-
#provider(provider_name, provider_options = {}) { ... } ⇒ Object
Add a provider to the list of provider configurations.
Instance Attribute Details
#Provider configurations(configurations) ⇒ Hash<Symbol,ProviderConfig> (readonly)
15 |
# File 'lib/cloud-config/providers.rb', line 15 attr_reader :providers |
#providers ⇒ Object (readonly)
Returns the value of attribute providers.
15 16 17 |
# File 'lib/cloud-config/providers.rb', line 15 def providers @providers end |
Instance Method Details
#provider(provider_name, provider_options = {}) { ... } ⇒ Object
Add a provider to the list of provider configurations.
23 24 25 26 27 28 |
# File 'lib/cloud-config/providers.rb', line 23 def provider(provider_name, = {}, &blk) provider_config = ProviderConfig.new(provider_name, ) provider_config.instance_eval(&blk) if blk @providers ||= {} @providers[provider_name] = provider_config end |