class Dragonfly::Job::FetchFile
Public Class Methods
new(job, path)
click to toggle source
Calls superclass method
# File lib/dragonfly/job/fetch_file.rb, line 7 def initialize(job, path) super(job, path.to_s) end
Public Instance Methods
apply()
click to toggle source
# File lib/dragonfly/job/fetch_file.rb, line 22 def apply job.content.update(Pathname.new(path), 'name' => filename) end
filename()
click to toggle source
# File lib/dragonfly/job/fetch_file.rb, line 18 def filename @filename ||= File.basename(path) end
init()
click to toggle source
# File lib/dragonfly/job/fetch_file.rb, line 10 def init job.url_attributes.name = filename end
path()
click to toggle source
# File lib/dragonfly/job/fetch_file.rb, line 14 def path @path ||= File.expand_path(args.first) end