Class: Guard::Tap

Inherits:
Plugin
  • Object
show all
Defined in:
lib/guard/tap.rb,
lib/guard/tap/runner.rb

Defined Under Namespace

Modules: Runner

Instance Method Summary collapse

Instance Method Details

#make_command(path) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/guard/tap.rb', line 17

def make_command path
  if options[:command]
    "#{options[:command]} #{Shellwords.escape path} 2>&1"
  else
    "#{Shellwords.escape path} 2>&1"
  end
end

#run_on_changes(paths) ⇒ Object



11
12
13
14
15
# File 'lib/guard/tap.rb', line 11

def run_on_changes paths
  paths.each{ |path|
    Runner.run make_command(path), path
  }
end