Class: Guard::Spork

Inherits:
Plugin
  • Object
show all
Defined in:
lib/guard/spork.rb,
lib/guard/spork/runner.rb,
lib/guard/spork/spork_instance.rb,
lib/guard/spork/spork_windows_instance.rb

Defined Under Namespace

Classes: Runner, SporkInstance, SporkWindowsInstance

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Spork

Returns a new instance of Spork.



12
13
14
15
# File 'lib/guard/spork.rb', line 12

def initialize(options={})
  super
  @runner = Runner.new(options)
end

Instance Attribute Details

#runner ⇒ Object

Returns the value of attribute runner.



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

def runner
  @runner
end

Instance Method Details

#reload ⇒ Object



22
23
24
# File 'lib/guard/spork.rb', line 22

def reload
  relaunch_sporks
end

#run_on_additions(paths) ⇒ Object



26
27
28
# File 'lib/guard/spork.rb', line 26

def run_on_additions(paths)
  relaunch_sporks
end

#run_on_modifications(paths) ⇒ Object



30
31
32
# File 'lib/guard/spork.rb', line 30

def run_on_modifications(paths)
  relaunch_sporks
end

#start ⇒ Object



17
18
19
20
# File 'lib/guard/spork.rb', line 17

def start
  runner.kill_global_sporks
  runner.launch_sporks("start")
end

#stop ⇒ Object



34
35
36
# File 'lib/guard/spork.rb', line 34

def stop
  runner.kill_sporks
end