Class: Paradeiser::Job
- Inherits:
-
Object
- Object
- Paradeiser::Job
- Includes:
- Executor
- Defined in:
- lib/paradeiser/models/job.rb
Constant Summary collapse
- JOB_PATTERN =
%r|^#{BIN_PAR} .+$|
Constants included from Executor
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(id) ⇒ Job
constructor
A new instance of Job.
- #ours? ⇒ Boolean
Methods included from Executor
Constructor Details
#initialize(id) ⇒ Job
Returns a new instance of Job.
9 10 11 |
# File 'lib/paradeiser/models/job.rb', line 9 def initialize(id) @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/paradeiser/models/job.rb', line 5 def id @id end |
Instance Method Details
#==(other) ⇒ Object
13 14 15 |
# File 'lib/paradeiser/models/job.rb', line 13 def ==(other) id == other.id end |
#ours? ⇒ Boolean
17 18 19 20 21 22 23 |
# File 'lib/paradeiser/models/job.rb', line 17 def ours? exec("#{at} -c #{@id}")[-2, 2].each do |line| if line return true if line.chomp.match(JOB_PATTERN) end end end |