Class: Guard::Spinoff

Inherits:
Guard
  • Object
show all
Defined in:
lib/guard/spinoff.rb,
lib/guard/spinoff/runner.rb,
lib/guard/spinoff/version.rb

Defined Under Namespace

Classes: Runner

Constant Summary collapse

VERSION =
"0.0.2"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(watchers = [], options = {}) ⇒ Spinoff

Returns a new instance of Spinoff.



9
10
11
12
# File 'lib/guard/spinoff.rb', line 9

def initialize(watchers = [], options = {})
  super
  @runner = Runner.new(options)
end

Instance Attribute Details

#runnerObject (readonly)

Returns the value of attribute runner.



7
8
9
# File 'lib/guard/spinoff.rb', line 7

def runner
  @runner
end

Instance Method Details

#reloadObject



23
24
25
26
# File 'lib/guard/spinoff.rb', line 23

def reload
  runner.kill
  runner.launch('Reload')
end

#run_allObject



28
29
30
# File 'lib/guard/spinoff.rb', line 28

def run_all
  runner.run_all
end

#run_on_change(paths) ⇒ Object



32
33
34
# File 'lib/guard/spinoff.rb', line 32

def run_on_change(paths)
  runner.run(paths)
end

#startObject



14
15
16
17
# File 'lib/guard/spinoff.rb', line 14

def start
  runner.kill
  runner.launch('Start')
end

#stopObject



19
20
21
# File 'lib/guard/spinoff.rb', line 19

def stop
  runner.kill
end