Module: Runify
- Defined in:
- lib/runify.rb,
lib/runify/version.rb
Overview
Runify Module
Constant Summary collapse
- VERSION =
Version
'0.1.6'
Instance Method Summary collapse
-
#restart ⇒ Object
Restart Calls shutdown, immediately followed by startup.
-
#shutdown ⇒ Object
Shutdown Requests the run method to complete and blocks until it returns.
-
#startup ⇒ Object
Startup Spawns a new Thread around the run method.
Instance Method Details
#restart ⇒ Object
Restart Calls shutdown, immediately followed by startup
32 33 34 35 |
# File 'lib/runify.rb', line 32 def restart shutdown startup end |
#shutdown ⇒ Object
Shutdown Requests the run method to complete and blocks until it returns
24 25 26 27 28 |
# File 'lib/runify.rb', line 24 def shutdown @stop = true @thread.join if @thread @thread = nil end |
#startup ⇒ Object
Startup Spawns a new Thread around the run method
16 17 18 19 20 |
# File 'lib/runify.rb', line 16 def startup return if @thread @stop = nil @thread = Thread.new { run } end |