Files

Class/Module Index [+]

Quicksearch

Dragonfly::Job::FetchUrl

Public Instance Methods

apply() click to toggle source
# File lib/dragonfly/job.rb, line 142
def apply
  open(url) do |f|
    job.update(f.read, :name => filename)
  end
end
filename() click to toggle source
# File lib/dragonfly/job.rb, line 139
def filename
  @filename ||= File.basename(path) if path[/[^\/]$/]
end
init() click to toggle source
# File lib/dragonfly/job.rb, line 130
def init
  job.url_attrs[:name] = filename
end
path() click to toggle source
# File lib/dragonfly/job.rb, line 136
def path
  @path ||= URI.parse(url).path
end
url() click to toggle source
# File lib/dragonfly/job.rb, line 133
def url
  @url ||= (args.first[%<^\w+://>] ? args.first : "http://#{args.first}")
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.