Class: Yahns::MaxBody::RewindableWrapper
- Defined in:
- lib/yahns/max_body/rewindable_wrapper.rb
Overview
Copyright © 2009-2013, Eric Wong <[email protected]> et. al. License: GPLv2 or later (www.gnu.org/licenses/gpl-2.0.txt)
Instance Method Summary collapse
-
#initialize(rack_input, limit) ⇒ RewindableWrapper
constructor
:nodoc:.
- #rewind ⇒ Object
- #size ⇒ Object
Methods inherited from Wrapper
#checked_read, #each, #gets, #read, #read_all
Constructor Details
#initialize(rack_input, limit) ⇒ RewindableWrapper
:nodoc:
5 6 7 8 |
# File 'lib/yahns/max_body/rewindable_wrapper.rb', line 5 def initialize(rack_input, limit) @orig_limit = limit super end |
Instance Method Details
#rewind ⇒ Object
10 11 12 13 14 |
# File 'lib/yahns/max_body/rewindable_wrapper.rb', line 10 def rewind @limit = @orig_limit @rbuf = '' @input.rewind end |
#size ⇒ Object
16 17 18 |
# File 'lib/yahns/max_body/rewindable_wrapper.rb', line 16 def size @input.size end |