Class: Startback::Jobs::Services

Inherits:
Services
  • Object
show all
Defined in:
lib/startback/jobs/services.rb

Instance Method Summary collapse

Instance Method Details

#get_job!(ref) ⇒ Object



5
6
7
8
9
10
# File 'lib/startback/jobs/services.rb', line 5

def get_job!(ref)
  job_relvar = startback_jobs.restrict(ref)
  Model::Job.full(job_relvar.one)
rescue Bmg::OneError
  not_found_error!("Job #{ref[:id]}")
end

#update_job!(ref, update) ⇒ Object



12
13
14
15
# File 'lib/startback/jobs/services.rb', line 12

def update_job!(ref, update)
  job_relvar = startback_jobs.restrict(ref)
  job_relvar.update(update)
end