Class: Dragonfly::Job::Process

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

Instance Attribute Summary

Attributes inherited from Step

#args, #job

Instance Method Summary collapse

Methods inherited from Step

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

Constructor Details

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

Instance Method Details

#applyObject



22
23
24
# File 'lib/dragonfly/job/process.rb', line 22

def apply
  processor.call(job.content, *arguments)
end

#argumentsObject



14
15
16
# File 'lib/dragonfly/job/process.rb', line 14

def arguments
  args[1..-1]
end

#initObject



6
7
8
# File 'lib/dragonfly/job/process.rb', line 6

def init
  processor.update_url(job.url_attributes, *arguments) if processor.respond_to?(:update_url)
end

#nameObject



10
11
12
# File 'lib/dragonfly/job/process.rb', line 10

def name
  args.first.to_sym
end

#processorObject



18
19
20
# File 'lib/dragonfly/job/process.rb', line 18

def processor
  @processor ||= app.get_processor(name)
end