define schemas as a hash, and validate hashes!
Homepage Rubygems Ruby Documentation Download
gem install hashidator -v 0.4.1
define schemas as a hash, and validate hashes! require 'hashidator' schema = {:name => String, :age => Integer} valid = {:name => "Harry", :age => 20} invalid = {:name => 1234, :age => "twenty"} h = Hashidator.new(schema) h.validate(valid) #=> true h.validate(invalid) #=> false see examples/basic.rb for full coverage. it knows classes, ranges, booleans, proc and duck typing. yay! to release this gem: * edit lib/hashidator/version.rb * edit CHANGES * git commit -am "Release VERSION" * rake release (c) 2009 harry vangberg <harry@vangberg.name>, peter suschlik <peter@suschlik.de> distributed under the mit license. google it.