Class: MotionWiretap::WiretapFilter
- Inherits:
-
WiretapChild
- Object
- Wiretap
- WiretapChild
- MotionWiretap::WiretapFilter
- Defined in:
- lib/motion-wiretap/all/wiretap.rb
Instance Attribute Summary
Attributes inherited from Wiretap
Instance Method Summary collapse
-
#initialize(parent, filter) ⇒ WiretapFilter
constructor
A new instance of WiretapFilter.
-
#trigger_changed(*values) ⇒ Object
passes the values through the filter before passing up to the parent implementation.
Methods inherited from WiretapChild
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, filter) ⇒ WiretapFilter
Returns a new instance of WiretapFilter.
352 353 354 355 |
# File 'lib/motion-wiretap/all/wiretap.rb', line 352 def initialize(parent, filter) @filter = filter super(parent) end |
Instance Method Details
#trigger_changed(*values) ⇒ Object
passes the values through the filter before passing up to the parent implementation
359 360 361 362 363 |
# File 'lib/motion-wiretap/all/wiretap.rb', line 359 def trigger_changed(*values) if @filter.call(*values) super(*values) end end |