Module: Herald::Watcher::Notifier::Callback
- Defined in:
- lib/herald/notifiers/callback.rb
Instance Attribute Summary collapse
-
#proc ⇒ Object
readonly
Returns the value of attribute proc.
Instance Method Summary collapse
- #notify(item) ⇒ Object
-
#parse_options(options) ⇒ Object
no options for Callback.
-
#test ⇒ Object
we can’t sandbox the proc to test it out, so just return true.
Instance Attribute Details
#proc ⇒ Object (readonly)
Returns the value of attribute proc.
7 8 9 |
# File 'lib/herald/notifiers/callback.rb', line 7 def proc @proc end |
Instance Method Details
#notify(item) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/herald/notifiers/callback.rb', line 16 def notify(item) if @proc.arity == 1 @proc.call(item) else @proc.call end end |
#parse_options(options) ⇒ Object
no options for Callback
10 |
# File 'lib/herald/notifiers/callback.rb', line 10 def (); end |
#test ⇒ Object
we can’t sandbox the proc to test it out, so just return true
14 |
# File 'lib/herald/notifiers/callback.rb', line 14 def test; true; end |