Skip to content
Quacks like a Hash, but contains one additional method (commit) to help you merge changes from child hashes.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
Gemfile.lock
README.md
Rakefile.rb
sonofhash.gemspec

README.md

Quacks like a Hash, but contains one additional method (commit) to help you merge changes from child hashes. I use it like Martin Fowler's Unit of Work pattern - http://martinfowler.com/eaaCatalog/unitOfWork.html

Circle CI Build Status Build Status

Typical usage:

require 'rubygems'
require 'sonofhash'

parent = SonOfHash.new
child = parent.new_child

parent['name'] = 'Moondublin'
puts child['name']            # Moondublin

child['name'] = 'Lugrat'
puts parent['name']           # Moondublin

child.commit
puts parent['name']           # Lugrat
Something went wrong with that request. Please try again.