Class: DRCtrl::Server
- Inherits:
-
Object
- Object
- DRCtrl::Server
- Defined in:
- lib/drctrl.rb
Overview
Controller service front object class.
Instance Method Summary collapse
-
#initialize { ... } ⇒ Server
constructor
A new instance of Server.
-
#restart ⇒ Integer
Restart the service.
-
#stop ⇒ void
Stop the service.
Constructor Details
#initialize { ... } ⇒ Server
Returns a new instance of Server.
18 19 20 |
# File 'lib/drctrl.rb', line 18 def initialize &block @block = block end |
Instance Method Details
#restart ⇒ Integer
Restart the service.
36 37 38 39 40 |
# File 'lib/drctrl.rb', line 36 def restart stop sleep 0 spawn 'ruby', File.($0), *($*) end |