Project

regstry

0.03
No commit activity in last 3 years
No release in over 3 years
Allows registering Ruby classes for lookup using a key.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Registry Build Status

Ruby class registry for registering, and looking up classes using a key, rather than the class name. Decouples looking up classes from their name and namespace.

Installation

gem install regstry

Note the missing i in the gem name. The name registry is taken by another gem.

Usage

require 'registry'

class Obj
  include Registry
end

class One < Obj
  register :one
end

class Two < Obj
  register :two
end

one = Obj[:one].new
two = Obj[:two].new