2010-09-07 15:21:16 -04:00
|
|
|
module Fog
|
|
|
|
module Provider
|
|
|
|
|
2011-02-04 11:17:30 -05:00
|
|
|
def self.extended(base)
|
2011-02-11 17:36:48 -05:00
|
|
|
Fog.providers << base.to_s.split('::').last
|
2011-02-04 11:17:30 -05:00
|
|
|
end
|
|
|
|
|
2011-01-07 18:09:46 -05:00
|
|
|
def service(new_service, path)
|
2011-07-27 10:30:49 -04:00
|
|
|
Fog.services[new_service] ||= []
|
|
|
|
Fog.services[new_service] << self.to_s.split('::').last.downcase.to_sym
|
|
|
|
self.services << new_service
|
2011-01-07 18:09:46 -05:00
|
|
|
require File.join('fog', path)
|
2010-09-07 15:21:16 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def services
|
|
|
|
@services ||= []
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|