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.



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

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



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

def trigger_changed(*values)
  Wiretap.instance_method(:trigger_changed).bind(self).call(@combiner.call(*values))
end