Sha256: 323ef8949220c66b196a65f107e5f2a10d2d152dbdde0a5fa12c4132519ca0df
Contents?: true
Size: 755 Bytes
Versions: 9
Compression:
Stored size: 755 Bytes
Contents
require 'attached/processor/base' require 'attached/processor/audio' require 'attached/processor/image' module Attached module Processor # Create a storage object given a medium and credentials. # # Usage: # # Attached::Processor.processor(:audio) # Attached::Processor.processor(:image) # Attached::Processor.processor(Attached::Processor::Video) def self.processor(processor) return processor if processor.is_a? Attached::Processor::Base case processor when :audio then return Attached::Processor::Audio when :image then return Attached::Processor::Image end raise "undefined processor '#{processor}'" end end end
Version data entries
9 entries across 9 versions & 1 rubygems