Sha256: 7c04af7a1f34670bb6d73bfbee65f6770308be223be78a7719c5c10acf0f30d0

Contents?: true

Size: 433 Bytes

Versions: 14

Compression:

Stored size: 433 Bytes

Contents

# -*- encoding: binary -*-
# Copyright (C) 2009-2013, Eric Wong <normalperson@yhbt.net> et. al.
# License: GPLv2 or later (https://www.gnu.org/licenses/gpl-2.0.txt)
class Yahns::MaxBody::RewindableWrapper < Yahns::MaxBody::Wrapper # :nodoc:
  def initialize(rack_input, limit)
    @orig_limit = limit
    super
  end

  def rewind
    @limit = @orig_limit
    @rbuf = ''
    @input.rewind
  end

  def size
    @input.size
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
yahns-1.9.0 lib/yahns/max_body/rewindable_wrapper.rb
yahns-1.8.0 lib/yahns/max_body/rewindable_wrapper.rb
yahns-1.7.0 lib/yahns/max_body/rewindable_wrapper.rb
yahns-1.6.0 lib/yahns/max_body/rewindable_wrapper.rb
yahns-1.5.0 lib/yahns/max_body/rewindable_wrapper.rb
yahns-1.4.0 lib/yahns/max_body/rewindable_wrapper.rb
yahns-1.3.1 lib/yahns/max_body/rewindable_wrapper.rb
yahns-1.3.0 lib/yahns/max_body/rewindable_wrapper.rb
yahns-1.2.0 lib/yahns/max_body/rewindable_wrapper.rb
yahns-1.1.0 lib/yahns/max_body/rewindable_wrapper.rb
yahns-1.0.0 lib/yahns/max_body/rewindable_wrapper.rb
yahns-0.0.3 lib/yahns/max_body/rewindable_wrapper.rb
yahns-0.0.2 lib/yahns/max_body/rewindable_wrapper.rb
yahns-0.0.1 lib/yahns/max_body/rewindable_wrapper.rb