Class: Bluepill::ProcessConditions::CpuUsage
- Inherits:
-
ProcessCondition
- Object
- ProcessCondition
- Bluepill::ProcessConditions::CpuUsage
- Defined in:
- lib/bluepill/process_conditions/cpu_usage.rb
Instance Method Summary collapse
- #check(value) ⇒ Object
-
#initialize(options = {}) ⇒ CpuUsage
constructor
A new instance of CpuUsage.
- #run(pid) ⇒ Object
Methods inherited from ProcessCondition
Constructor Details
#initialize(options = {}) ⇒ CpuUsage
Returns a new instance of CpuUsage.
5 6 7 |
# File 'lib/bluepill/process_conditions/cpu_usage.rb', line 5 def initialize( = {}) @below = [:below] end |
Instance Method Details
#check(value) ⇒ Object
14 15 16 |
# File 'lib/bluepill/process_conditions/cpu_usage.rb', line 14 def check(value) value < @below end |