Class: Dragonfly::Job::FetchFile

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

Constructor Details

This class inherits a constructor from Dragonfly::Job::Step

Instance Method Details

#applyObject



124
125
126
# File 'lib/dragonfly/job.rb', line 124

def apply
  job.update(Pathname.new(path), :name => filename)
end

#filenameObject



121
122
123
# File 'lib/dragonfly/job.rb', line 121

def filename
  @filename ||= File.basename(path)
end

#initObject



115
116
117
# File 'lib/dragonfly/job.rb', line 115

def init
  job.url_attrs[:name] = filename
end

#pathObject



118
119
120
# File 'lib/dragonfly/job.rb', line 118

def path
  @path ||= File.expand_path(args.first)
end