Class: Racket::Helpers::File::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/racket/helpers/file.rb

Overview

Class for sending files.

Instance Method Summary collapse

Constructor Details

#initialize(utils, file, options) ⇒ Response

Returns a new instance of Response.



26
27
28
29
30
31
32
# File 'lib/racket/helpers/file.rb', line 26

def initialize(utils, file, options)
  @utils = utils
  @file = @utils.build_path(file)
  @options = options
  @response = Racket::Response.new
  build
end

Instance Method Details

#to_aArray

Returns the current object as a Rack response array.

Returns:

  • (Array)


37
38
39
# File 'lib/racket/helpers/file.rb', line 37

def to_a
  @response.to_a
end