Class: ServerEngine::ProcessManager::Target
- Inherits:
-
Object
- Object
- ServerEngine::ProcessManager::Target
- Defined in:
- lib/serverengine/process_manager.rb
Instance Attribute Summary collapse
-
#pipe ⇒ Object
readonly
Returns the value of attribute pipe.
Instance Method Summary collapse
- #close ⇒ Object
- #heartbeat! ⇒ Object
-
#initialize(pipe) ⇒ Target
constructor
A new instance of Target.
Constructor Details
#initialize(pipe) ⇒ Target
Returns a new instance of Target.
492 493 494 |
# File 'lib/serverengine/process_manager.rb', line 492 def initialize(pipe) @pipe = pipe end |
Instance Attribute Details
#pipe ⇒ Object (readonly)
Returns the value of attribute pipe.
496 497 498 |
# File 'lib/serverengine/process_manager.rb', line 496 def pipe @pipe end |
Instance Method Details
#close ⇒ Object
502 503 504 505 506 507 |
# File 'lib/serverengine/process_manager.rb', line 502 def close if @pipe @pipe.close rescue nil @pipe = nil end end |
#heartbeat! ⇒ Object
498 499 500 |
# File 'lib/serverengine/process_manager.rb', line 498 def heartbeat! @pipe.write HEARTBEAT_MESSAGE end |