Class: Guard::Rackup
- Defined in:
- lib/guard/rackup.rb,
lib/guard/rackup/runner.rb,
lib/guard/rackup/version.rb
Defined Under Namespace
Classes: Runner
Constant Summary collapse
- VERSION =
"0.0.1"
Instance Attribute Summary collapse
-
#runner ⇒ Object
readonly
Returns the value of attribute runner.
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ Rackup
constructor
A new instance of Rackup.
-
#reload ⇒ Object
Called when ‘reload|r|z + enter` is pressed.
-
#run_all ⇒ Object
Called when just ‘enter` is pressed This method should be principally used for long action like running all specs/tests/…
-
#run_on_changes(paths = []) ⇒ Object
Default behaviour on file(s) changes that the Guard watches.
-
#start ⇒ Object
Call once when Guard starts.
-
#stop ⇒ Object
Called when ‘stop|quit|exit|s|q|e + enter` is pressed (when Guard quits).
Constructor Details
Instance Attribute Details
#runner ⇒ Object (readonly)
Returns the value of attribute runner.
9 10 11 |
# File 'lib/guard/rackup.rb', line 9 def runner @runner end |
Instance Method Details
#reload ⇒ Object
Called when ‘reload|r|z + enter` is pressed. This method should be mainly used for “reload” (really!) actions like reloading passenger/spork/bundler/…
40 41 42 |
# File 'lib/guard/rackup.rb', line 40 def reload @runner.reload end |
#run_all ⇒ Object
Called when just ‘enter` is pressed This method should be principally used for long action like running all specs/tests/…
50 51 52 |
# File 'lib/guard/rackup.rb', line 50 def run_all run_on_changes end |
#run_on_changes(paths = []) ⇒ Object
Default behaviour on file(s) changes that the Guard watches.
60 61 62 |
# File 'lib/guard/rackup.rb', line 60 def run_on_changes(paths = []) @runner.reload end |
#start ⇒ Object
Call once when Guard starts. Please override initialize method to init stuff.
21 22 23 |
# File 'lib/guard/rackup.rb', line 21 def start run_all if [:all_on_start] end |
#stop ⇒ Object
Called when ‘stop|quit|exit|s|q|e + enter` is pressed (when Guard quits).
30 31 32 |
# File 'lib/guard/rackup.rb', line 30 def stop @runner.stop end |