class TingYun::Http::CurbResponse
Public Class Methods
new(curlobj)
click to toggle source
# File lib/ting_yun/http/curb_wrappers.rb, line 52 def initialize(curlobj) @headers = {} @curlobj = curlobj end
Public Instance Methods
[](key)
click to toggle source
# File lib/ting_yun/http/curb_wrappers.rb, line 57 def [](key) @headers[ key.downcase ] end
append_header_data( data )
click to toggle source
# File lib/ting_yun/http/curb_wrappers.rb, line 65 def append_header_data( data ) key, value = data.split( /:\s*/, 2 ) @headers[ key.downcase ] = value @curlobj._ty_header_str ||= '' @curlobj._ty_header_str << data end
to_hash()
click to toggle source
# File lib/ting_yun/http/curb_wrappers.rb, line 61 def to_hash @headers.dup end