Module: LoopDance
- Defined in:
- lib/loop_dance.rb,
lib/loop_dance/dancer.rb,
lib/loop_dance/railtie.rb,
lib/loop_dance/commands.rb,
lib/loop_dance/controller.rb
Defined Under Namespace
Modules: Commands
Classes: Controller, Dancer, Railtie, Task
Class Method Summary
collapse
Class Method Details
.restart_all(force = false) ⇒ Object
15
16
17
18
19
20
|
# File 'lib/loop_dance.rb', line 15
def restart_all( force=false )
return puts "LoopDance: No dancers defined" if LoopDance::Dancer.subclasses.empty?
LoopDance::Dancer.subclasses.each do |dancer|
dancer.controller.safely_restart if force || dancer.autostart
end
end
|
.start_all(force = false) ⇒ Object
8
9
10
11
12
13
|
# File 'lib/loop_dance.rb', line 8
def start_all( force=false )
return puts "LoopDance: No dancers defined" if LoopDance::Dancer.subclasses.empty?
LoopDance::Dancer.subclasses.each do |dancer|
dancer.controller.safely_start if force || dancer.autostart
end
end
|
.stop_all ⇒ Object
22
23
24
25
26
27
|
# File 'lib/loop_dance.rb', line 22
def stop_all
return puts "LoopDance: No dancers defined" if LoopDance::Dancer.subclasses.empty?
LoopDance::Dancer.subclasses.each do |dancer|
dancer.controller.safely_stop
end
end
|