Class: Dragonfly::Job::Encode
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
92
93
94
95
96
97
|
# File 'lib/dragonfly/job.rb', line 92
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)
job.meta[:format] = format
end
|
#arguments ⇒ Object
89
90
91
|
# File 'lib/dragonfly/job.rb', line 89
def arguments
args[1..-1]
end
|
86
87
88
|
# File 'lib/dragonfly/job.rb', line 86
def format
args.first
end
|
83
84
85
|
# File 'lib/dragonfly/job.rb', line 83
def init
job.meta[:format] = format
end
|