Class: Bricolage::JobTask

Inherits:
Object
  • Object
show all
Defined in:
lib/bricolage/taskqueue.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(job) ⇒ JobTask

Returns a new instance of JobTask.



138
139
140
# File 'lib/bricolage/taskqueue.rb', line 138

def initialize(job)
  @job = job
end

Instance Attribute Details

#jobObject (readonly)

Returns the value of attribute job.



142
143
144
# File 'lib/bricolage/taskqueue.rb', line 142

def job
  @job
end

Class Method Details

.deserialize(str) ⇒ Object



148
149
150
151
# File 'lib/bricolage/taskqueue.rb', line 148

def JobTask.deserialize(str)
  job, * = str.strip.split("\t")
  new(JobNet::Ref.parse(job))
end

Instance Method Details

#serializeObject



144
145
146
# File 'lib/bricolage/taskqueue.rb', line 144

def serialize
  [@job].join("\t")
end