Class: Guard::Shell

Inherits:
Plugin
  • Object
show all
Defined in:
lib/guard/shell.rb

Instance Method Summary collapse

Instance Method Details

#run_allObject

Call #run_on_change for all files which match this guard.



18
19
20
# File 'lib/guard/shell.rb', line 18

def run_all
  run_on_modifications(Watcher.match_files(self, Dir.glob('{,**/}*{,.*}').uniq))
end

#run_on_modifications(res) ⇒ Object

Print the result of the command(s), if there are results to be printed.



23
24
25
# File 'lib/guard/shell.rb', line 23

def run_on_modifications(res)
  puts res if res
end

#startObject

Calls #run_all if the :all_on_start option is present.



9
10
11
# File 'lib/guard/shell.rb', line 9

def start
  run_all if options[:all_on_start]
end

#stopObject

Defined only to make callback(:stop_begin) and callback(:stop_end) working



14
15
# File 'lib/guard/shell.rb', line 14

def stop
end