Class: Chimp::ExecutionGroupFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/right_chimp/queue/ExecutionGroup.rb

Overview

Factory

Class Method Summary collapse

Class Method Details

.from_type(type) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/right_chimp/queue/ExecutionGroup.rb', line 7

def self.from_type(type)
  if type == :serial
    return SerialExecutionGroup.new(nil)
  elsif type == :parallel
    return ParallelExecutionGroup.new(nil)
  else
    raise "invalid execution group type specified"
  end
end