mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[core] dedup services listings
This commit is contained in:
parent
899db456bd
commit
aa1262a6ba
1 changed files with 6 additions and 2 deletions
|
@ -12,8 +12,8 @@ module Fog
|
|||
|
||||
def service(new_service, path)
|
||||
Fog.services[new_service] ||= []
|
||||
Fog.services[new_service] << self.to_s.split('::').last.downcase.to_sym
|
||||
self.services << new_service
|
||||
Fog.services[new_service] |= [self.to_s.split('::').last.downcase.to_sym]
|
||||
self.services |= [new_service]
|
||||
require File.join('fog', path)
|
||||
end
|
||||
|
||||
|
@ -21,5 +21,9 @@ module Fog
|
|||
@services ||= []
|
||||
end
|
||||
|
||||
def services=(new_services)
|
||||
@services = new_services
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue