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

[core] avoid duplicates in Fog.providers

This commit is contained in:
geemus 2011-10-19 15:59:17 -05:00
parent 34e6a1105c
commit 951ba8c380

View file

@ -4,10 +4,14 @@ module Fog
@providers ||= []
end
def self.providers=(new_providers)
@providers = new_providers
end
module Provider
def self.extended(base)
Fog.providers << base.to_s.split('::').last
Fog.providers |= [base.to_s.split('::').last]
end
def [](service_key)