Methods
C
E
N
Attributes
[R] path
[R] range
[R] to_path
Class Public methods
new(path, range)
# File lib/rack/file.rb, line 108
def initialize path, range
  @path  = path
  @range = range
end
Instance Public methods
close()
# File lib/rack/file.rb, line 127
def close; end
each()
# File lib/rack/file.rb, line 113
def each
  ::File.open(path, "rb") do |file|
    file.seek(range.begin)
    remaining_len = range.end-range.begin+1
    while remaining_len > 0
      part = file.read([8192, remaining_len].min)
      break unless part
      remaining_len -= part.length

      yield part
    end
  end
end