Module: Racket::Helpers::File

Defined in:
lib/racket/helpers/file.rb

Overview

Helper module that handles files

Defined Under Namespace

Classes: Response

Instance Method Summary collapse

Instance Method Details

#send_file(file, options = {}) ⇒ Array

Sends the contents of a file to the client.

Parameters:

  • file (String)
  • options (Hash) (defaults to: {})

Returns:

  • (Array)


85
86
87
88
# File 'lib/racket/helpers/file.rb', line 85

def send_file(file, options = {})
  response = Response.new(Controller.context.utils, file, options).to_a
  respond!(*response)
end