Class: Checkson::Check::Process
- Defined in:
- lib/checkson/checks/process.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(opts = {}) ⇒ Process
constructor
A new instance of Process.
Methods inherited from Base
Constructor Details
#initialize(opts = {}) ⇒ Process
Returns a new instance of Process.
8 9 10 11 12 13 |
# File 'lib/checkson/checks/process.rb', line 8 def initialize(opts = {}) @opts = opts raise ArgumentError, 'Neither pidfile nor process name given' unless @opts[:pidfile] || @opts[:name] super() end |
Instance Method Details
#check ⇒ Object
15 16 17 |
# File 'lib/checkson/checks/process.rb', line 15 def check @opts[:pidfile] ? check_pidfile : check_name end |