Class: Watchr::Script::Rule
- Inherits:
-
Struct
- Object
- Struct
- Watchr::Script::Rule
- Defined in:
- lib/watchr/script.rb
Overview
Convenience type. Provides clearer and simpler access to rule properties.
Examples
rule = script.watch('lib/.*\.rb') { 'ohaie' }
rule.pattern #=> 'lib/.*\.rb'
rule.action.call #=> 'ohaie'
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action
20 21 22 |
# File 'lib/watchr/script.rb', line 20 def action @action end |
#pattern ⇒ Object
Returns the value of attribute pattern
20 21 22 |
# File 'lib/watchr/script.rb', line 20 def pattern @pattern end |