Sha256: b8c34071b43f7351334eee9707aaadae7d48af46accb1bfa2ff703738e39a651

Contents?: true

Size: 561 Bytes

Versions: 5

Compression:

Stored size: 561 Bytes

Contents

# encoding: UTF-8

module Spontaneous::Media
  module Store
    autoload :Backend, "spontaneous/media/store/backend"
    autoload :Local,   "spontaneous/media/store/local"
    autoload :Cloud,   "spontaneous/media/store/cloud"

    extend self

    def create(config)
      case config[:provider]
      when "Local", "local"
        Local.new(config[:local_root], config[:url], config[:accepts])
      else
        bucket =  config.delete(:bucket)
        accepts = config.delete(:accepts)
        Cloud.new(config, bucket, accepts)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spontaneous-0.2.0.beta9 lib/spontaneous/media/store.rb
spontaneous-0.2.0.beta8 lib/spontaneous/media/store.rb
spontaneous-0.2.0.beta7 lib/spontaneous/media/store.rb
spontaneous-0.2.0.beta6 lib/spontaneous/media/store.rb
spontaneous-0.2.0.beta5 lib/spontaneous/media/store.rb