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



125
126
127
# File 'lib/thinkingdata-ruby/td_batch_consumer.rb', line 125

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

#[]=(name, val) ⇒ Object



129
130
131
132
133
134
135
# File 'lib/thinkingdata-ruby/td_batch_consumer.rb', line 129

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

#capitalize(name) ⇒ Object



137
138
139
# File 'lib/thinkingdata-ruby/td_batch_consumer.rb', line 137

def capitalize(name)
  name
end

#initialize_http_header(headers) ⇒ Object



120
121
122
123
# File 'lib/thinkingdata-ruby/td_batch_consumer.rb', line 120

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