class ForemanInventoryUpload::Async::UploadReportDirectJob::FileUpload

Wrapper class to avoid monkey-patching File for multipart uploads

Attributes

content_type[R]
file[R]

Public Class Methods

new(file, content_type:) click to toggle source
# File lib/foreman_inventory_upload/async/upload_report_direct_job.rb, line 15
def initialize(file, content_type:)
  @file = file
  @content_type = content_type
end

Public Instance Methods

method_missing(method_name, *args, &block) click to toggle source
Calls superclass method
# File lib/foreman_inventory_upload/async/upload_report_direct_job.rb, line 32
def method_missing(method_name, *args, &block)
  if @file.respond_to?(method_name)
    @file.send(method_name, *args, &block)
  else
    super
  end
end
path() click to toggle source
# File lib/foreman_inventory_upload/async/upload_report_direct_job.rb, line 24
def path
  @file.path
end
read(*args) click to toggle source
# File lib/foreman_inventory_upload/async/upload_report_direct_job.rb, line 20
def read(*args)
  @file.read(*args)
end
respond_to_missing?(method_name, include_private = false) click to toggle source
Calls superclass method
# File lib/foreman_inventory_upload/async/upload_report_direct_job.rb, line 28
def respond_to_missing?(method_name, include_private = false)
  @file.respond_to?(method_name, include_private) || super
end