Method: CemDataProcessor::Parser::Validation#array_of_hashes?

Defined in:
lib/cem_data_processor/parser.rb

#array_of_hashes?(value) ⇒ Boolean

Checks if the value is an Array of Hashes.

Parameters:

  • value (Any)

    The value to be checked.

Returns:

  • (Boolean)

    True if the value is an Array of Hashes, false otherwise.



67
68
69
# File 'lib/cem_data_processor/parser.rb', line 67

def array_of_hashes?(value)
  value.is_a?(Array) && value.all? { |h| h.is_a?(Hash) }
end