lib/evil/client/resolver.rb in evil-client-3.0.4 vs lib/evil/client/resolver.rb in evil-client-3.1.0
- old
+ new
@@ -67,14 +67,14 @@
def __definition_error__(text)
DefinitionError.new(@__schema__, @__keys__, @__settings__, text)
end
def __symbolize_keys__(hash)
- hash.each_with_object({}) { |(key, val), obj| obj[key.to_sym] = val }
+ hash.transform_keys(&:to_sym)
end
def __stringify_keys__(hash)
- hash.each_with_object({}) { |(key, val), obj| obj[key.to_s] = val }
+ hash.transform_keys(&:to_s)
end
def respond_to_missing?(name, *)
@__settings__.respond_to? name
end