Class: Dragonfly::Job::FetchFile
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
124
125
126
|
# File 'lib/dragonfly/job.rb', line 124
def apply
job.update(Pathname.new(path), :name => filename)
end
|
121
122
123
|
# File 'lib/dragonfly/job.rb', line 121
def filename
@filename ||= File.basename(path)
end
|
115
116
117
|
# File 'lib/dragonfly/job.rb', line 115
def init
job.url_attrs[:name] = filename
end
|
118
119
120
|
# File 'lib/dragonfly/job.rb', line 118
def path
@path ||= File.expand_path(args.first)
end
|