1
0
Fork 0
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:
geemus 2011-09-22 16:04:24 -05:00
parent 899db456bd
commit aa1262a6ba

View file

@ -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