Class: Watchr::Script::Rule

Inherits:
Struct
  • Object
show all
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

Instance Attribute Details

#actionObject

Returns the value of attribute action

Returns:

  • (Object)

    the current value of action



20
21
22
# File 'lib/watchr/script.rb', line 20

def action
  @action
end

#patternObject

Returns the value of attribute pattern

Returns:

  • (Object)

    the current value of pattern



20
21
22
# File 'lib/watchr/script.rb', line 20

def pattern
  @pattern
end