Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/tap/support/executable.rb,
lib/tap/support/tdoc.rb,
lib/tap/support/tdoc.rb,
lib/tap/support/tdoc.rb
Overview
Tap extends Object with _method
to generate executable methods that can be enqued by Tap::App and incorporated into workflows.
array = []
push_to_array = array._method(:push)
task = Tap::Task.new
task.sequence(push_to_array)
task.enq(1).enq(2,3)
task.app.run
array # => [[1],[2,3]]
Instance Method Summary collapse
-
#_method(method_name, app = Tap::App.instance) ⇒ Object
Initializes a Tap::Support::Executable using the object returned by Object#method(method_name).
Instance Method Details
#_method(method_name, app = Tap::App.instance) ⇒ Object
Initializes a Tap::Support::Executable using the object returned by Object#method(method_name).
Returns nil if Object#method returns nil.
322 323 324 325 |
# File 'lib/tap/support/executable.rb', line 322 def _method(method_name, app=Tap::App.instance) return nil unless m = method(method_name) Tap::Support::Executable.initialize(m, :call, app) end |