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

- (Object) apply



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

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

- (Object) filename



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

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

- (Object) init



109
110
111
# File 'lib/dragonfly/job.rb', line 109

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

- (Object) path



112
113
114
# File 'lib/dragonfly/job.rb', line 112

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