Class: Djin::Executor

Inherits:
Object
  • Object
show all
Defined in:
lib/djin/executor.rb

Instance Method Summary collapse

Constructor Details

#initialize(task_repository: Djin.task_repository) ⇒ Executor

Returns a new instance of Executor.



5
6
7
# File 'lib/djin/executor.rb', line 5

def initialize(task_repository: Djin.task_repository)
  @task_repository = task_repository
end

Instance Method Details

#call(*tasks) ⇒ Object



9
10
11
12
13
# File 'lib/djin/executor.rb', line 9

def call(*tasks)
  tasks.each do |task|
    run_task(task)
  end
end