Class: Guard::Restarter
- Inherits:
-
Guard
- Object
- Guard
- Guard::Restarter
- Defined in:
- lib/guard/restarter.rb
Constant Summary collapse
- VERSION =
"0.0.3"
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ Restarter
constructor
A new instance of Restarter.
- #run_on_changes(paths) ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(watchers = [], options = {}) ⇒ Restarter
Returns a new instance of Restarter.
9 10 11 12 13 14 15 |
# File 'lib/guard/restarter.rb', line 9 def initialize(watchers = [], = {}) super @pid = nil @command = [:command] @spawn = [:spawn] raise "Must provide option :command or :spawn" unless @command || @spawn end |
Instance Method Details
#run_on_changes(paths) ⇒ Object
22 23 24 25 26 |
# File 'lib/guard/restarter.rb', line 22 def run_on_changes(paths) run_info stop_server start_server end |
#start ⇒ Object
17 18 19 20 |
# File 'lib/guard/restarter.rb', line 17 def start() start_info start_server end |
#stop ⇒ Object
28 |
# File 'lib/guard/restarter.rb', line 28 def stop() stop_server end |