Class: Guard::Spin

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

Defined Under Namespace

Classes: Runner

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Spin.



10
11
12
13
# File 'lib/guard/spin.rb', line 10

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

Instance Attribute Details

#runnerObject

Returns the value of attribute runner.



8
9
10
# File 'lib/guard/spin.rb', line 8

def runner
  @runner
end

Instance Method Details

#reloadObject



20
21
22
23
# File 'lib/guard/spin.rb', line 20

def reload
  runner.kill_spin
  runner.launch_spin("Reload")
end

#run_allObject



25
26
27
# File 'lib/guard/spin.rb', line 25

def run_all
  runner.run_all
end

#run_on_changes(paths) ⇒ Object Also known as: run_on_change



29
30
31
# File 'lib/guard/spin.rb', line 29

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

#startObject



15
16
17
18
# File 'lib/guard/spin.rb', line 15

def start
  runner.kill_spin
  runner.launch_spin("Start")
end

#stopObject



35
36
37
# File 'lib/guard/spin.rb', line 35

def stop
  runner.kill_spin
end