Method: Watchr::Script#default_action
- Defined in:
- lib/watchr/script.rb
#default_action(&action) ⇒ Proc
Convenience method. Define a default action to be triggered when a rule has none specified. When called without a block, acts as a getter and returns stored default_action
157 158 159 160 |
# File 'lib/watchr/script.rb', line 157 def default_action(&action) @default_action = action if action @default_action end |