Class: Grifork::Executor::Local

Inherits:
Object
  • Object
show all
Includes:
Grifork::Executable
Defined in:
lib/grifork/executor/local.rb

Instance Method Summary collapse

Methods included from Grifork::Executable

#rsync, #rsync_remote, #sh, #ssh

Methods included from Loggable

#logger

Methods included from Configured

#config

Constructor Details

#initialize(type, &task) ⇒ Local

Initialize with task

Parameters:

  • &task (Proc)

    task to execute



6
7
8
9
# File 'lib/grifork/executor/local.rb', line 6

def initialize(type, &task)
  @type = type
  @task = task
end

Instance Method Details

#runObject

Run the task



12
13
14
# File 'lib/grifork/executor/local.rb', line 12

def run
  instance_eval(&@task)
end