Class: Dragonfly::Job::Fetch

Inherits:
Step show all
Defined in:
lib/dragonfly/job/fetch.rb

Defined Under Namespace

Classes: NotFound

Instance Attribute Summary

Attributes inherited from Step

#args, #job

Instance Method Summary collapse

Methods inherited from Step

abbreviation, #app, basename, #init, #initialize, #inspect, step_name, #to_a

Constructor Details

This class inherits a constructor from Dragonfly::Job::Step

Instance Method Details

#applyObject

Raises:


12
13
14
15
16
# File 'lib/dragonfly/job/fetch.rb', line 12

def apply
  content, meta = app.datastore.read(uid)
  raise NotFound, "uid #{uid} not found" if content.nil?
  job.content.update(content, meta)
end

#uidObject


8
9
10
# File 'lib/dragonfly/job/fetch.rb', line 8

def uid
  args.first
end