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)


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

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