Module: CukeSalad::TaskAuthor

Defined in:
lib/cukesalad/task_author.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.in_order_to(do_something, *with_attributes, &actions) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/cukesalad/task_author.rb', line 9

def TaskAuthor.in_order_to do_something, *with_attributes, &actions
  attr_map = with_attributes[0]
  name = Codify::ConstName.from do_something
  m = Module.new do
    define_method :perform_task, &actions
    define_method :the do | value |
      value_of( attr_map.key value )
    end
  end
  Kernel.const_set name, m
end

Instance Method Details

#in_order_to(do_something, *with_attributes, &actions) ⇒ Object



5
6
7
# File 'lib/cukesalad/task_author.rb', line 5

def in_order_to do_something, *with_attributes, &actions
  TaskAuthor.in_order_to do_something, *with_attributes, &actions
end