Module: Attached::Processor
- Defined in:
- lib/attached/processor.rb,
lib/attached/processor/base.rb,
lib/attached/processor/audio.rb,
lib/attached/processor/error.rb,
lib/attached/processor/image.rb
Defined Under Namespace
Classes: Audio, Base, Error, Image
Class Method Summary collapse
-
.processor(processor) ⇒ Object
Create a storage object given a medium and credentials.
Class Method Details
.processor(processor) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/attached/processor.rb', line 17 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 |