module HttpStub::Extensions::Core::Hash

Public Instance Methods

underscore_keys() click to toggle source
# File lib/http_stub/extensions/core/hash.rb, line 7
def underscore_keys
  self.each_with_object({}) do |element, result|
    result[element[0].is_a?(::String) ? element[0].tr("-", "_") : element[0]] = element[1]
  end
end
with_indifferent_and_insensitive_access() click to toggle source
# File lib/http_stub/extensions/core/hash.rb, line 13
def with_indifferent_and_insensitive_access
  HttpStub::Extensions::Core::Hash::WithIndifferentAndInsensitiveAccess.new(self)
end