Class: Reacto::Operations::Concat

Inherits:
Object
  • Object
show all
Defined in:
lib/reacto/operations/concat.rb

Instance Method Summary collapse

Constructor Details

#initialize(trackable) ⇒ Concat

TODO Continue on error flag!



7
8
9
# File 'lib/reacto/operations/concat.rb', line 7

def initialize(trackable)
  @trackable = trackable
end

Instance Method Details

#call(tracker) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/reacto/operations/concat.rb', line 11

def call(tracker)
  Subscriptions::OperationSubscription.new(
    tracker,
    close: -> () { @trackable.send(:do_track, tracker) },
    error: -> (e) {
      tracker.on_error(e)
      @trackable.send(:do_track, tracker)
    }
  )
end