class Excon::Headers
Constants
- SENTINEL
Public Class Methods
Source
# File lib/excon/headers.rb, line 24 def initialize super @downcased = {} end
Calls superclass method
Public Instance Methods
Source
# File lib/excon/headers.rb, line 29 def [](key) @downcased[key.to_s.downcase] end
Also aliased as: raw_reader
Source
# File lib/excon/headers.rb, line 33 def []=(key, value) raw_writer(key, value) @downcased[key.to_s.downcase] = value end
Also aliased as: raw_writer, store
Source
# File lib/excon/headers.rb, line 40 def assoc(obj) @downcased.assoc(obj.downcase) end
Source
# File lib/excon/headers.rb, line 45 def delete(key, &proc) raw_delete(key, &proc) @downcased.delete(key.to_s.downcase, &proc) end
Also aliased as: raw_delete
Source
# File lib/excon/headers.rb, line 50 def fetch(key, default = nil, &proc) if proc @downcased.fetch(key.to_s.downcase, &proc) else @downcased.fetch(key.to_s.downcase, default) end end
Also aliased as: raw_fetch
Source
# File lib/excon/headers.rb, line 58 def has_key?(key) raw_key?(key) || @downcased.has_key?(key.to_s.downcase) end
Source
# File lib/excon/headers.rb, line 64 def merge(other_hash) self.dup.merge!(other_hash) end
Also aliased as: raw_merge
Source
# File lib/excon/headers.rb, line 68 def merge!(other_hash) other_hash.each do |key, value| self[key] = value end raw_merge!(other_hash) end
Also aliased as: raw_merge!
Source
# File lib/excon/headers.rb, line 75 def rehash @downcased.rehash raw_rehash end
Also aliased as: raw_rehash
Source
# File lib/excon/headers.rb, line 80 def values_at(*keys) @downcased.values_at(*keys.map {|key| key.to_s.downcase}) end
Also aliased as: raw_values_at