Class: Treat::Workers::Processors::Chunkers::Autoselect
- Inherits:
-
Object
- Object
- Treat::Workers::Processors::Chunkers::Autoselect
- Defined in:
- lib/treat/workers/processors/chunkers/autoselect.rb
Class Method Summary collapse
Class Method Details
.chunk(entity, options = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/treat/workers/processors/chunkers/autoselect.rb', line 3 def self.chunk(entity, = {}) unless entity.has?(:format) entity.set :format, 'txt' end begin k = Treat::Workers::Processors::Chunkers.const_get(entity.format.cc) k.chunk(entity, ) rescue Treat::Exception Treat::Workers::Processors::Chunkers::TXT.chunk(entity, ) end end |