Class: Sinatra::Helpers::StaticFile

Inherits:
File
  • Object
show all
Defined in:
lib/sinatra/base.rb

Overview

Rack response body used to deliver static files. The file contents are generated iteratively in 8K chunks.

Instance Method Summary collapse

Instance Method Details

#eachObject



172
173
174
175
176
177
# File 'lib/sinatra/base.rb', line 172

def each
  rewind
  while buf = read(8192)
    yield buf
  end
end