Module: Tap::App::Node
Overview
Node adds the node API to objects responding to call. Additional helper methods are added to simplify the construction of workflows; they are not required by the API.
Instance Attribute Summary collapse
-
#joins ⇒ Object
The joins called when call completes.
Class Method Summary collapse
-
.extended(obj) ⇒ Object
Sets up required variables for extended objects.
-
.intern(&block) ⇒ Object
Interns a new node by extending the block with Node.
Instance Method Summary collapse
-
#on_complete(&block) ⇒ Object
Sets the block as a join for self.
Instance Attribute Details
#joins ⇒ Object
The joins called when call completes
10 11 12 |
# File 'lib/tap/app/node.rb', line 10 def joins @joins end |
Class Method Details
.extended(obj) ⇒ Object
Sets up required variables for extended objects.
18 19 20 |
# File 'lib/tap/app/node.rb', line 18 def self.extended(obj) # :nodoc: obj.instance_variable_set(:@joins, []) end |
.intern(&block) ⇒ Object
Interns a new node by extending the block with Node.
13 14 15 |
# File 'lib/tap/app/node.rb', line 13 def self.intern(&block) block.extend self end |
Instance Method Details
#on_complete(&block) ⇒ Object
Sets the block as a join for self.
23 24 25 26 |
# File 'lib/tap/app/node.rb', line 23 def on_complete(&block) # :yields: result self.joins << block if block self end |