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:
parent
34e6a1105c
commit
951ba8c380
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue