Class: Guard::Chef
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ Chef
constructor
A new instance of Chef.
-
#reload ⇒ Object
Called on Ctrl-Z signal This method should be mainly used for “reload” (really!) actions like reloading passenger/spork/bundler/…
-
#run_all ⇒ Object
Called on Ctrl-/ signal This method should be principally used for long action like running all specs/tests/…
-
#run_on_change(paths) ⇒ Object
Called on file(s) modifications.
-
#start ⇒ Object
Called once when Guard starts Please override initialize method to init stuff.
-
#stop ⇒ Object
Called on Ctrl-C signal (when Guard quits).
Constructor Details
#initialize(watchers = [], options = {}) ⇒ Chef
Returns a new instance of Chef.
9 10 11 12 13 |
# File 'lib/guard/chef.rb', line 9 def initialize(watchers=[], ={}) super @base_dir = ::File.('../../../', __FILE__) # init stuff here, thx! end |
Instance Method Details
#reload ⇒ Object
Called on Ctrl-Z signal This method should be mainly used for “reload” (really!) actions like reloading passenger/spork/bundler/…
35 36 37 |
# File 'lib/guard/chef.rb', line 35 def reload true end |
#run_all ⇒ Object
Called on Ctrl-/ signal This method should be principally used for long action like running all specs/tests/…
41 42 43 |
# File 'lib/guard/chef.rb', line 41 def run_all true end |
#run_on_change(paths) ⇒ Object
Called on file(s) modifications
46 47 48 49 50 51 52 53 |
# File 'lib/guard/chef.rb', line 46 def run_on_change(paths) paths.each do |path| unless updated?(path) return false end end true end |
#start ⇒ Object
Called once when Guard starts Please override initialize method to init stuff
24 25 26 |
# File 'lib/guard/chef.rb', line 24 def start true end |
#stop ⇒ Object
Called on Ctrl-C signal (when Guard quits)
29 30 31 |
# File 'lib/guard/chef.rb', line 29 def stop true end |