Skip to content

pokle/SonOfHash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Tests

bundle install --path vendor/bundle
bundle exec rake

About

Quacks like a Hash, but contains one additional method (commit) to help you merge changes from child hashes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages