Class: Guard::Pow
- Inherits:
-
Plugin
- Object
- Plugin
- Guard::Pow
- Defined in:
- lib/guard/pow.rb,
lib/guard/pow/manager.rb
Defined Under Namespace
Classes: Manager
Instance Attribute Summary collapse
-
#manager ⇒ Object
Returns the value of attribute manager.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Pow
constructor
A new instance of Pow.
- #reload ⇒ Object
- #run_on_changes(paths) ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Pow
Returns a new instance of Pow.
10 11 12 13 14 15 16 17 |
# File 'lib/guard/pow.rb', line 10 def initialize( = {}) super = { restart_on_start: false, restart_on_reload: true }.merge() @manager = Manager.new end |
Instance Attribute Details
#manager ⇒ Object
Returns the value of attribute manager.
8 9 10 |
# File 'lib/guard/pow.rb', line 8 def manager @manager end |
Instance Method Details
#reload ⇒ Object
23 24 25 |
# File 'lib/guard/pow.rb', line 23 def reload manager.restart if [:restart_on_reload] end |
#run_on_changes(paths) ⇒ Object
27 28 29 |
# File 'lib/guard/pow.rb', line 27 def run_on_changes(paths) manager.restart end |
#start ⇒ Object
19 20 21 |
# File 'lib/guard/pow.rb', line 19 def start manager.restart if [:restart_on_start] end |