Class: Cognizant::Process::Conditions::PollCondition

Inherits:
Object
  • Object
show all
Defined in:
lib/cognizant/process/conditions/poll_condition.rb

Direct Known Subclasses

AlwaysTrue, CpuUsage, MemoryUsage

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ PollCondition

Returns a new instance of PollCondition.



5
6
7
# File 'lib/cognizant/process/conditions/poll_condition.rb', line 5

def initialize(options = {})
  @options = options
end

Instance Method Details

#check(value) ⇒ Object



13
14
15
# File 'lib/cognizant/process/conditions/poll_condition.rb', line 13

def check(value)
  raise "Implement in subclass!"
end

#format_value(value) ⇒ Object



17
18
19
# File 'lib/cognizant/process/conditions/poll_condition.rb', line 17

def format_value(value)
  value
end

#run(pid) ⇒ Object



9
10
11
# File 'lib/cognizant/process/conditions/poll_condition.rb', line 9

def run(pid)
  raise "Implement in subclass!"
end