Class: Guard::Go
- Inherits:
-
Guard
- Object
- Guard
- Guard::Go
- Defined in:
- lib/guard/go.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(watchers = [], options = {}) ⇒ Go
constructor
A new instance of Go.
- #run_on_change(paths) ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(watchers = [], options = {}) ⇒ Go
Returns a new instance of Go.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/guard/go.rb', line 10 def initialize(watchers = [], = {}) super defaults = { :server => 'app.go', :test => false } @options = defaults.merge() @runner = ::Guard::GoRunner.new(@options) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/guard/go.rb', line 8 def @options end |
Instance Method Details
#run_on_change(paths) ⇒ Object
28 29 30 31 |
# File 'lib/guard/go.rb', line 28 def run_on_change(paths) start_info run_info @runner.restart end |
#start ⇒ Object
23 24 25 26 |
# File 'lib/guard/go.rb', line 23 def start start_info run_info @runner.start end |
#stop ⇒ Object
33 34 35 36 37 |
# File 'lib/guard/go.rb', line 33 def stop @runner.stop UI.info "Stopping Go..." Notifier.notify("Until next time...", :title => "Go shutting down.", :image => :pending) end |