Class: Guard::Shell
Instance Method Summary collapse
-
#run_all ⇒ Object
Call #run_on_change for all files which match this guard.
-
#run_on_modifications(res) ⇒ Object
Print the result of the command(s), if there are results to be printed.
-
#start ⇒ Object
Calls #run_all if the :all_on_start option is present.
-
#stop ⇒ Object
Defined only to make callback(:stop_begin) and callback(:stop_end) working.
Instance Method Details
#run_all ⇒ Object
Call #run_on_change for all files which match this guard.
19 20 21 |
# File 'lib/guard/shell.rb', line 19 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.
24 25 26 |
# File 'lib/guard/shell.rb', line 24 def run_on_modifications(res) puts res if res end |
#start ⇒ Object
Calls #run_all if the :all_on_start option is present.
10 11 12 |
# File 'lib/guard/shell.rb', line 10 def start run_all if [:all_on_start] end |
#stop ⇒ Object
Defined only to make callback(:stop_begin) and callback(:stop_end) working
15 16 |
# File 'lib/guard/shell.rb', line 15 def stop end |