Module: Fog::Provider
- Included in:
- AWS, Atmos, BareMetalCloud, Bluebox, Brightbox, Clodo, CloudSigma, Cloudstack, DNSMadeEasy, DNSimple, DigitalOcean, Dreamhost, Dynect, Ecloud, Glesys, GoGrid, Google, HP, IBM, InternetArchive, Joyent, Libvirt, Linode, Local, Ninefold, OpenStack, Openvz, Ovirt, Rackspace, RiakCS, Serverlove, StormOnDemand, Vcloud, Vmfusion, Voxel, Vsphere, XenServer, 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
18 19 20 |
# File 'lib/fog/core/provider.rb', line 18 def [](service_key) eval(@services_registry[service_key]).new end |
#service(new_service, path, constant_string) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/fog/core/provider.rb', line 22 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
30 31 32 |
# File 'lib/fog/core/provider.rb', line 30 def services @services_registry.keys end |