Class: Qs::ProcessSignal
- Inherits:
-
Object
- Object
- Qs::ProcessSignal
- Defined in:
- lib/qs/process_signal.rb
Instance Attribute Summary collapse
-
#pid ⇒ Object
readonly
Returns the value of attribute pid.
-
#signal ⇒ Object
readonly
Returns the value of attribute signal.
Instance Method Summary collapse
-
#initialize(daemon, signal) ⇒ ProcessSignal
constructor
A new instance of ProcessSignal.
- #send ⇒ Object
Constructor Details
#initialize(daemon, signal) ⇒ ProcessSignal
Returns a new instance of ProcessSignal.
9 10 11 12 |
# File 'lib/qs/process_signal.rb', line 9 def initialize(daemon, signal) @signal = signal @pid = PIDFile.new(daemon.pid_file).pid end |
Instance Attribute Details
#pid ⇒ Object (readonly)
Returns the value of attribute pid.
7 8 9 |
# File 'lib/qs/process_signal.rb', line 7 def pid @pid end |
#signal ⇒ Object (readonly)
Returns the value of attribute signal.
7 8 9 |
# File 'lib/qs/process_signal.rb', line 7 def signal @signal end |
Instance Method Details
#send ⇒ Object
14 15 16 |
# File 'lib/qs/process_signal.rb', line 14 def send ::Process.kill(@signal, @pid) end |