Class: Reacto::Operations::Prepend
- Inherits:
-
Object
- Object
- Reacto::Operations::Prepend
- Defined in:
- lib/reacto/operations/prepend.rb
Instance Attribute Summary collapse
-
#enumerable ⇒ Object
readonly
Returns the value of attribute enumerable.
Instance Method Summary collapse
- #call(tracker) ⇒ Object
-
#initialize(enumerable) ⇒ Prepend
constructor
A new instance of Prepend.
Constructor Details
#initialize(enumerable) ⇒ Prepend
Returns a new instance of Prepend.
6 7 8 |
# File 'lib/reacto/operations/prepend.rb', line 6 def initialize(enumerable) @enumerable = enumerable end |
Instance Attribute Details
#enumerable ⇒ Object (readonly)
Returns the value of attribute enumerable.
4 5 6 |
# File 'lib/reacto/operations/prepend.rb', line 4 def enumerable @enumerable end |
Instance Method Details
#call(tracker) ⇒ Object
10 11 12 13 |
# File 'lib/reacto/operations/prepend.rb', line 10 def call(tracker) enumerable.each { |value| tracker.on_value(value) } tracker end |