Class: Guard::Processing
Defined Under Namespace
Classes: ProcessController
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ Processing
constructor
A new instance of Processing.
- #run_on_changes(paths) ⇒ Object
Constructor Details
#initialize(watchers = [], options = {}) ⇒ Processing
7 8 9 10 11 12 |
# File 'lib/guard/processing.rb', line 7 def initialize(watchers = [], = {}) = { :pid_dir => 'tmp/pids' }.merge() FileUtils.makedirs([:pid_dir]) FileUtils.makedirs([:output]) super end |
Instance Method Details
#run_on_changes(paths) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/guard/processing.rb', line 14 def run_on_changes(paths) paths.map {|path| Pathname.new(path) }.each do |path| dir = path..dirname process = ProcessController.new([:pid_dir], path) process.run("processing-java --sketch=#{dir} --output=#{options[:output]} --run --force") end end |