Class: Net::ReadAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/net/http/capture.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#stored_bodyObject (readonly)

Returns the value of attribute stored_body.



21
22
23
# File 'lib/net/http/capture.rb', line 21

def stored_body
  @stored_body
end

Instance Method Details

#<<(str) ⇒ Object

If a block is used to process the incoming body data, ensure we’re keeping it for inspection later too



25
26
27
28
# File 'lib/net/http/capture.rb', line 25

def <<(str)
  (@stored_body ||= '') << str
  old_write_to(str)
end

#old_write_toObject



23
# File 'lib/net/http/capture.rb', line 23

alias :old_write_to :<<