Module: Hog::Utils
- Included in:
- Hog
- Defined in:
- lib/hog/utils.rb
Instance Method Summary collapse
Instance Method Details
#explode(hsh, path, into_path) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/hog/utils.rb', line 3 def explode(hsh, path, into_path) arr = hsh.delete(path) exploded = [] arr.each do |item| exploded << ({ into_path => item }.merge(hsh)) end exploded end |