Sha256: 42f1fb6fc8c5b9df1be4d192e96322bede485ce7fd898a076381089b7f9bc329

Contents?: true

Size: 479 Bytes

Versions: 1

Compression:

Stored size: 479 Bytes

Contents

require 'attached/storage/aws'

module Attached
  module Storage
    
    # Create a storage object given a medium and credentials.
    #
    # Usage:
    #
    #   Attached::Storage.medium()
    #   Attached::Storage.medium(:aws)
    
    def self.storage(medium = :aws, credentials = nil)
      
      case medium
      when :aws then return Attached::Storage::AWS.new credentials
      else raise "Undefined storage medium '#{medium}'."
      end
      
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
attached-0.1.8 lib/attached/storage.rb