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.
4 5 6 |
# File 'lib/bluepill/process_conditions/cpu_usage.rb', line 4 def initialize( = {}) @below = [:below] end |
Instance Method Details
#check(value) ⇒ Object
13 14 15 |
# File 'lib/bluepill/process_conditions/cpu_usage.rb', line 13 def check(value) value < @below end |