Module: Fog::Provider
- Included in:
- AWS, Bluebox, Brightbox, DNSMadeEasy, DNSimple, Dynect, Ecloud, Glesys, GoGrid, Google, Libvirt, Linode, Local, NewServers, Ninefold, OpenStack, Rackspace, Slicehost, StormOnDemand, Vcloud, VirtualBox, Vmfusion, Voxel, Vsphere, Zerigo
- Defined in:
- lib/fog/core/provider.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#[](service_key) ⇒ Object
13 14 15 |
# File 'lib/fog/core/provider.rb', line 13 def [](service_key) eval(@services_registry[service_key]).new end |
#service(new_service, path, constant_string) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/fog/core/provider.rb', line 17 def service(new_service, path, constant_string) Fog.services[new_service] ||= [] Fog.services[new_service] |= [self.to_s.split('::').last.downcase.to_sym] @services_registry ||= {} @services_registry[new_service] = [self.to_s, constant_string].join('::') require File.join('fog', path) end |
#services ⇒ Object
25 26 27 |
# File 'lib/fog/core/provider.rb', line 25 def services @services_registry.keys end |