Class: Epi::Triggers::Touch

Inherits:
Epi::Trigger::JobTrigger show all
Defined in:
lib/epi/triggers/touch.rb

Instance Attribute Summary

Attributes inherited from Epi::Trigger

#args, #job

Instance Method Summary collapse

Methods inherited from Epi::Trigger

#logger, make, #try, #try_with

Constructor Details

#initialize(*args) ⇒ Touch

Returns a new instance of Touch.



5
6
7
8
# File 'lib/epi/triggers/touch.rb', line 5

def initialize(*args)
  super *args
  update
end

Instance Method Details

#messageObject



16
17
18
# File 'lib/epi/triggers/touch.rb', line 16

def message
  "Path '#{path}' was touched"
end

#testObject



10
11
12
13
14
# File 'lib/epi/triggers/touch.rb', line 10

def test
  ino = @ino; mtime = @mtime
  update
  ino != @ino || mtime != @mtime
end