class Jobler::FileDownload

Attributes

file_name[R]
temp_file[R]
url[R]

Public Class Methods

new(file_name: nil, temp_file: nil, url: nil) click to toggle source
# File lib/jobler/file_download.rb, line 4
def initialize(file_name: nil, temp_file: nil, url: nil)
  raise "Temp file or URL should be given" if !temp_file && !url
  raise "No filename given with temp-file" if temp_file && file_name.blank?

  @file_name = file_name
  @temp_file = temp_file
  @url = url
end