Class: MotionWiretap::WiretapCombiner

Inherits:
WiretapChild show all
Defined in:
lib/motion-wiretap/all/wiretap.rb

Instance Attribute Summary

Attributes inherited from Wiretap

#value

Instance Method Summary collapse

Methods inherited from WiretapChild

#teardown

Methods inherited from Wiretap

#and_then, #cancel!, #combine, #dealloc, #enqueue, #filter, #listen, #map, #on_error, #queue, #reduce, #teardown, #trigger_changed_on, #trigger_completed, #trigger_completed_on, #trigger_error, #trigger_error_on

Constructor Details

#initialize(parent, combiner) ⇒ WiretapCombiner

Returns a new instance of WiretapCombiner.



369
370
371
372
# File 'lib/motion-wiretap/all/wiretap.rb', line 369

def initialize(parent, combiner)
  @combiner = combiner
  super(parent)
end

Instance Method Details

#trigger_changed(*values) ⇒ Object

passes the values through the combiner before passing up to the parent implementation



376
377
378
# File 'lib/motion-wiretap/all/wiretap.rb', line 376

def trigger_changed(*values)
  super(@combiner.call(*values))
end