1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/core/provider.rb

30 lines
536 B
Ruby
Raw Normal View History

module Fog
def self.providers
@providers ||= []
end
module Provider
def self.extended(base)
2011-02-11 17:36:48 -05:00
Fog.providers << base.to_s.split('::').last
end
def service(new_service, path)
Fog.services[new_service] ||= []
2011-09-22 17:04:24 -04:00
Fog.services[new_service] |= [self.to_s.split('::').last.downcase.to_sym]
self.services |= [new_service]
require File.join('fog', path)
end
def services
@services ||= []
end
2011-09-22 17:04:24 -04:00
def services=(new_services)
@services = new_services
end
end
end