Sha256: 9dad21c2e4ca01ded78b24db09d58bc4e96ad3c16eb318c5b839c5be64b7fc5b
Contents?: true
Size: 441 Bytes
Versions: 7
Compression:
Stored size: 441 Bytes
Contents
class Mechanize class Headers < Hash def [](key) super(key.downcase) end def []=(key, value) super(key.downcase, value) end def key?(key) super(key.downcase) end def canonical_each block_given? or return enum_for(__method__) each { |key, value| key = key.capitalize key.gsub!(/-([a-z])/) { "-#{$1.upcase}" } yield [key, value] } end end end
Version data entries
7 entries across 7 versions & 3 rubygems