Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/spec_forge/core_ext/array.rb
Overview
Extensions to Ruby's Array class for SpecForge functionality
Adds utility methods used throughout SpecForge for array manipulation and data processing.
Direct Known Subclasses
Instance Method Summary collapse
-
#to_merged_h ⇒ Hash
Merges an array of hashes into a single hash.
Instance Method Details
#to_merged_h ⇒ Hash
Merges an array of hashes into a single hash
Performs a deep merge on each hash in the array, combining them into a single hash with all keys and values.
22 23 24 25 26 |
# File 'lib/spec_forge/core_ext/array.rb', line 22 def to_merged_h each_with_object({}) do |hash, output| output.deep_merge!(hash) end end |