Object
# File lib/rack/utils.rb, line 451
451: def initialize(path, content_type = "text/plain", binary = false)
452: raise "#{path} file does not exist" unless ::File.exist?(path)
453: @content_type = content_type
454: @original_filename = ::File.basename(path)
455: @tempfile = Tempfile.new(@original_filename)
456: @tempfile.set_encoding(Encoding::BINARY) if @tempfile.respond_to?(:set_encoding)
457: @tempfile.binmode if binary
458: FileUtils.copy_file(path, @tempfile.path)
459: end
# File lib/rack/utils.rb, line 461
461: def path
462: @tempfile.path
463: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.