Sha256: a8e7f3a6268c6cf46ee308fd053bf4375759d019d6c5e959b97b85270ec2054e
Contents?: true
Size: 502 Bytes
Versions: 23
Compression:
Stored size: 502 Bytes
Contents
require 'pathname' require 'dragonfly/job/step' module Dragonfly class Job class FetchFile < Step def initialize(job, path) super(job, path.to_s) end def init job.url_attributes.name = filename end def path @path ||= File.expand_path(args.first) end def filename @filename ||= File.basename(path) end def apply job.content.update(Pathname.new(path), 'name' => filename) end end end end
Version data entries
23 entries across 23 versions & 1 rubygems