Class: ThinkingData::CaseSensitivePost

Inherits:
Net::HTTP::Post
  • Object
show all
Defined in:
lib/thinkingdata-ruby/td_batch_consumer.rb

Overview

Private class. Send data tools

Instance Method Summary collapse

Instance Method Details

#[](name) ⇒ Object



154
155
156
# File 'lib/thinkingdata-ruby/td_batch_consumer.rb', line 154

def [](name)
  @header[name.to_s]
end

#[]=(name, val) ⇒ Object



158
159
160
161
162
163
164
# File 'lib/thinkingdata-ruby/td_batch_consumer.rb', line 158

def []=(name, val)
  if val
    @header[name.to_s] = [val]
  else
    @header.delete(name.to_s)
  end
end

#capitalize(name) ⇒ Object



166
167
168
# File 'lib/thinkingdata-ruby/td_batch_consumer.rb', line 166

def capitalize(name)
  name
end

#initialize_http_header(headers) ⇒ Object



149
150
151
152
# File 'lib/thinkingdata-ruby/td_batch_consumer.rb', line 149

def initialize_http_header(headers)
  @header = {}
  headers.each{|k,v| @header[k.to_s] = [v] }
end