Class: Xing::Tasks::Tasklib

Inherits:
Mattock::Tasklib
  • Object
show all
Defined in:
lib/xing/tasks/tasklib.rb

Direct Known Subclasses

Backend, Build, Develop, Frontend, Initialize, Spec

Instance Method Summary collapse

Instance Method Details

#edict_task(name, klass, &_block) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/xing/tasks/tasklib.rb', line 6

def edict_task(name, klass, &_block)
  edict = klass.new do |eddie|
    copy_settings_to(eddie)
    yield eddie if block_given?
  end
  edict_task = task name do
    edict.enact
  end

  # For testing purposes
  edict_task.instance_variable_set("@edict", edict)
  def edict_task.edict
    @edict
  end

  edict_task
end