0.0
No commit activity in last 3 years
No release in over 3 years
A Hash with Business Logic (call it intelligent).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.8
~> 1.6
~> 0.9
~> 0.2
~> 2.9
~> 2.14
 Project Readme

lab42_ihash

A Hash with Business Logic ( call it intelligent ).

Actually it is a view layer over a Hash like object, which needs to obey the simple protocol

Hash#fetch.

The services IHash provides are of the number of four:

  • Default values per key.
  • Validation via Constraints.
  • Business Logic or Lookup Logic.
  • Caching of Computed Values.

Installation

    gem install lab42_ihash --pre

Usage

    require 'lab42/ihash'

    IHash = Lab42::IHash

Or to do the same in one line of code

    require 'lab42/ihash/auto_import'

Manual (QED Driven)

Details are explained in the QED demos here