lib/adhoq/global_variable.rb in adhoq-0.0.2 vs lib/adhoq/global_variable.rb in adhoq-0.0.3
- old
+ new
@@ -20,15 +20,18 @@
@config ||= Adhoq::Configuration.new
end
private
- # TODO Implement S3
def setup_storage(type, *args)
- unless type == :local_file
- raise NotImplementedError
- end
+ klass =
+ case type
+ when :local_file then Adhoq::Storage::LocalFile
+ when :s3 then Adhoq::Storage::S3
+ else
+ raise NotImplementedError
+ end
- Adhoq::Storage::LocalFile.new(*args)
+ klass.new(*args)
end
end
end