Showing 3 of 3 total issues
Method from_hash
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def from_hash(hash, klass, transforms = []) obj = klass.new return obj if hash.nil? || hash.empty? raise ArgumentError, "#{hash.inspect} is not a hash" unless hash.is_a?(Hash)
- Read upRead up
Method indifferent!
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def indifferent!(hash) return unless hash.is_a?(Hash) # Set the default proc to allow the key to be either string or symbol if # a matching key is found.
- Read upRead up
Method indifferent_array!
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def indifferent_array!(array) return unless array.is_a?(Array) array.each do |i| if i.is_a?(Hash)
- Read upRead up