Class: LiquidProxy::Service
- Inherits:
-
Object
- Object
- LiquidProxy::Service
- Includes:
- Singleton
- Defined in:
- lib/liquid-proxy/service.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.method_missing(*args) ⇒ Object
23 24 25 |
# File 'lib/liquid-proxy/service.rb', line 23 def self.method_missing(*args) instance.send(*args) end |
Instance Method Details
#start(opts = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/liquid-proxy/service.rb', line 9 def start(opts = {}) if @child and @child.alive? return end @port = opts[:port] @child = Subprocess.new(opts) end |
#up? ⇒ Boolean
19 20 21 |
# File 'lib/liquid-proxy/service.rb', line 19 def up? !!(@child && @child.alive? && Utils::PortExplorer.port_occupied?(@port)) end |