Module: Prawn::Markup::HashMerger
- Defined in:
- lib/prawn/markup/support/hash_merger.rb
Class Method Summary collapse
Class Method Details
.deep(hash, other) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/prawn/markup/support/hash_merger.rb', line 6 def self.deep(hash, other) hash.merge(other) do |_key, this_val, other_val| if this_val.is_a?(Hash) && other_val.is_a?(Hash) deep(this_val, other_val) else other_val end end end |
.enhance(options, key, hash) ⇒ Object
16 17 18 |
# File 'lib/prawn/markup/support/hash_merger.rb', line 16 def self.enhance(, key, hash) [key] = hash.merge([key]) end |