Sha256: a5784ccf5ced169892e673d07842e0ff96fdc17284593ad31e502f1fb26d8e08
Contents?: true
Size: 770 Bytes
Versions: 98
Compression:
Stored size: 770 Bytes
Contents
module Fog def self.providers @providers ||= {} end def self.providers=(new_providers) @providers = new_providers end module Provider def self.extended(base) provider = base.to_s.split('::').last Fog.providers[provider.downcase.to_sym] = provider end def [](service_key) eval(@services_registry[service_key]).new end 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 def services @services_registry.keys end end end
Version data entries
98 entries across 98 versions & 17 rubygems