Last active
August 29, 2015 14:10
-
-
Save smison/1c7d69a52717d6c461b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fssm' | |
watch_dir = '~/watch_action' | |
def create_action(base, file) | |
puts 'hoge' | |
end | |
def update_action(base, file) | |
puts 'hoge' | |
end | |
def delete_action(base, file) | |
puts 'hoge' | |
end | |
FSSM.monitor(watch_dir,'**/*') do | |
create do |base,file| | |
create_action(base, file) | |
end | |
update do |base,file| | |
update_action(base, file) | |
end | |
delete do |base,file| | |
delete_action(base, file) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment