Class: ProcChain::Builder
- Inherits:
-
Object
- Object
- ProcChain::Builder
- Defined in:
- lib/proc_chain.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(data = nil) ⇒ Builder
constructor
A new instance of Builder.
- #next ⇒ Object
Constructor Details
#initialize(data = nil) ⇒ Builder
Returns a new instance of Builder.
6 7 8 |
# File 'lib/proc_chain.rb', line 6 def initialize(data = nil) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/proc_chain.rb', line 5 def data @data end |
Instance Method Details
#next ⇒ Object
10 11 12 13 |
# File 'lib/proc_chain.rb', line 10 def next @data = yield @data self end |