Module: Souffle::Provider
- Defined in:
- lib/souffle/provider.rb
Overview
A metal provider module (Describes AWS, Softlayer, etc).
Defined Under Namespace
Class Method Summary collapse
-
.plugin(name) ⇒ Souffle::Provider::Base
Returns the plugin with the given name.
-
.plugins ⇒ Array
Returns the list of available provider plugins.
Class Method Details
.plugin(name) ⇒ Souffle::Provider::Base
Returns the plugin with the given name.
19 20 21 22 23 24 |
# File 'lib/souffle/provider.rb', line 19 def plugin(name) plug = constants.select { |k| k.to_s.downcase == name.downcase }.first Souffle::Provider.const_get(plug) rescue Souffle::Exceptions::PluginDoesNotExist => e Souffle::Log.error "#{e.}:\n#{e.backtrace.join("\n")}" end |
.plugins ⇒ Array
Returns the list of available provider plugins.
10 11 12 |
# File 'lib/souffle/provider.rb', line 10 def plugins constants.map { |k| k.to_s.downcase } end |