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