Class: Observr::Script::Rule

Inherits:
Struct
  • Object
show all
Defined in:
lib/observr/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



23
24
25
# File 'lib/observr/script.rb', line 23

def action
  @action
end

#event_typeObject

Returns the value of attribute event_type

Returns:

  • (Object)

    the current value of event_type



23
24
25
# File 'lib/observr/script.rb', line 23

def event_type
  @event_type
end

#patternObject

Returns the value of attribute pattern

Returns:

  • (Object)

    the current value of pattern



23
24
25
# File 'lib/observr/script.rb', line 23

def pattern
  @pattern
end