Skip to content

Commit

Permalink
Merge pull request #6402 from ministryofjustice/hash_extensions
Browse files Browse the repository at this point in the history
Remove bury method
  • Loading branch information
jrmhaig authored Jan 5, 2024
2 parents 96e42c2 + 3e2e4a0 commit c7e2056
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/extensions/hash_extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,5 @@ def key_paths(path = [])
end
end
end

def bury(value, *keys)
keys[0...-1].inject(self) do |acc, key|
acc.public_send(:[], key)
end.public_send(:[]=, keys.last, value)
end
end
end

0 comments on commit c7e2056

Please sign in to comment.