Class: RubyP

Inherits:
Object
  • Object
show all
Defined in:
lib/raka/protocol.rb

Overview

A special language protocol, just a wrapper for action, pass block instead of string to execute named RubyP to avoid name collision

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ RubyP

Returns a new instance of RubyP.



71
72
73
# File 'lib/raka/protocol.rb', line 71

def initialize(&block)
  @block = block
end

Instance Method Details

#call(_, task, &resolve) ⇒ Object



75
76
77
78
# File 'lib/raka/protocol.rb', line 75

def call(_, task, &resolve)
  @block.call(task, &resolve)
  FileUtils.touch(task.name)
end