Class: Dragonfly::Job::Encode
- Inherits:
-
Step
show all
- Defined in:
- lib/dragonfly/job.rb
Instance Attribute Summary
Attributes inherited from Step
#args, #job
Instance Method Summary
(collapse)
Methods inherited from Step
abbreviation, basename, #initialize, #inspect, step_name
Instance Method Details
94
95
96
97
98
|
# File 'lib/dragonfly/job.rb', line 94
def apply
raise NothingToEncode, "Can't encode because temp object has not been initialized. Need to fetch first?" unless job.temp_object
content, meta = job.app.encoder.encode(job.temp_object, format, *arguments)
job.update(content, (meta || {}).merge(:format => format))
end
|
- (Object) arguments
91
92
93
|
# File 'lib/dragonfly/job.rb', line 91
def arguments
args[1..-1]
end
|
88
89
90
|
# File 'lib/dragonfly/job.rb', line 88
def format
args.first
end
|
85
86
87
|
# File 'lib/dragonfly/job.rb', line 85
def init
job.url_attrs[:format] = format
end
|