Sha256: 850669cf9789adfb64414191319c4890e04bf626baf134845ddc7ce9ba7f0a3f
Contents?: true
Size: 468 Bytes
Versions: 7
Compression:
Stored size: 468 Bytes
Contents
# frozen_string_literal: true module Micro module Attributes module AttributesUtils ARGUMENT_ERROR_MSG = 'argument must be a Hash'.freeze def self.hash_argument!(arg) return arg if arg.is_a?(Hash) raise ArgumentError, ARGUMENT_ERROR_MSG end def self.stringify_hash_keys!(arg) hash_argument!(arg).each_with_object({}) do |(key, val), memo| memo[key.to_s] = val end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems