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
Instance Method Details
22
23
24
|
# File 'lib/dragonfly/job/process.rb', line 22
def apply
processor.call(job.content, *arguments)
end
|
#arguments ⇒ Object
14
15
16
|
# File 'lib/dragonfly/job/process.rb', line 14
def arguments
args[1..-1]
end
|
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
|
10
11
12
|
# File 'lib/dragonfly/job/process.rb', line 10
def name
args.first.to_sym
end
|
#processor ⇒ Object
18
19
20
|
# File 'lib/dragonfly/job/process.rb', line 18
def processor
@processor ||= app.get_processor(name)
end
|