Sha256: 4a58c7f3e488fd769e1f8da890246515ca1eaec01dc6a1e8e774bb6d65d43c6e

Contents?: true

Size: 280 Bytes

Versions: 11

Compression:

Stored size: 280 Bytes

Contents

module Rack::App::InstanceMethods::ServeFile

  def serve_file(file_path)
    rack_resp = Rack::App::FileServer.serve_file(request.env, file_path)
    response.status = rack_resp[0]
    response.headers.merge!(rack_resp[1])
    response.body = rack_resp[2]
    finish!
  end

end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
rack-app-11.0.2 lib/rack/app/instance_methods/serve_file.rb
rack-app-11.0.1 lib/rack/app/instance_methods/serve_file.rb
rack-app-11.0.0 lib/rack/app/instance_methods/serve_file.rb
rack-app-10.0.0 lib/rack/app/instance_methods/serve_file.rb
rack-app-9.0.0 lib/rack/app/instance_methods/serve_file.rb
rack-app-8.1.0 lib/rack/app/instance_methods/serve_file.rb
rack-app-8.0.1 lib/rack/app/instance_methods/serve_file.rb
rack-app-8.0.0 lib/rack/app/instance_methods/serve_file.rb
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/gems/rack-app-7.7.0/lib/rack/app/instance_methods/serve_file.rb
rack-app-7.7.0 lib/rack/app/instance_methods/serve_file.rb
rack-app-7.6.5 lib/rack/app/instance_methods/serve_file.rb