Module: SendFile

Defined in:
lib/send_file.rb

Instance Method Summary collapse

Instance Method Details

#send_file(path) ⇒ Object



4
5
6
7
8
9
# File 'lib/send_file.rb', line 4

def send_file(path)
  file = Rack::File.new(nil)
  file.path = path

  return halt(file.serving(env))
end