Module: Fog::Provider
- Defined in:
- lib/fog/core/provider.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#[](service_key) ⇒ Object
16 17 18 |
# File 'lib/fog/core/provider.rb', line 16 def [](service_key) eval(@services_registry[service_key]).new end |
#service(new_service, constant_string) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/fog/core/provider.rb', line 20 def service(new_service, constant_string) Fog.services[new_service] ||= [] Fog.services[new_service] |= [to_s.split("::").last.downcase.to_sym] @services_registry ||= {} @services_registry[new_service] = [to_s, constant_string].join("::") end |
#services ⇒ Object
27 28 29 |
# File 'lib/fog/core/provider.rb', line 27 def services @services_registry.keys end |