Skip to content
Ruby Class Registry
Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
spec
.gitignore
.rspec
.travis.yml
Gemfile
LICENSE.md
README.md
registry.gemspec

README.md

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
You can’t perform that action at this time.