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/local/bin.rb
2010-05-01 22:10:11 -07:00

34 lines
597 B
Ruby

module Local
class << self
if Fog.credentials[:local_root]
def initialized?
true
end
def [](service)
@@connections ||= Hash.new do |hash, key|
credentials = Fog.credentials.reject do |k,v|
![:local_root].include?(k)
end
hash[key] = case key
when :files
Fog::Local.new(credentials)
end
end
@@connections[service]
end
def directories
self[:files].directories
end
else
def initialized?
false
end
end
end
end