Class: MotionWiretap::WiretapFilter
- Inherits:
-
WiretapChild
- Object
- Wiretap
- WiretapChild
- MotionWiretap::WiretapFilter
- Defined in:
- lib/motion-wiretap/all/wiretap.rb
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.
334 335 336 337 |
# File 'lib/motion-wiretap/all/wiretap.rb', line 334 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
341 342 343 344 345 |
# File 'lib/motion-wiretap/all/wiretap.rb', line 341 def trigger_changed(*values) if ( @filter.call(*values) ) super(*values) end end |