Class: RubyP
- Inherits:
-
Object
- Object
- RubyP
- 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
- #call(_, task, &resolve) ⇒ Object
-
#initialize(&block) ⇒ RubyP
constructor
A new instance of RubyP.
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 |