jgaskins / perpetuity

Persistence gem for Ruby objects using the Data Mapper pattern
http://jgaskins.org/blog/2012/04/20/data-mapper-vs-active-record/
MIT License
250 stars 14 forks source link

Make MapperRegistry an object #18

Closed jgaskins closed 11 years ago

jgaskins commented 11 years ago

The MapperRegistry class is currently never instantiated and just uses class-level state. What I'd like to see is a MapperRegistry object created and stored within the Configuration object. This will allow us to be able to instantiate multiple Perpetuity configurations each with its own MapperRegistry.

Also, class-level state is a smell I'd rather not have.

jgaskins commented 11 years ago

Fixed by 0dd5fc39ff13cd9c3d68dfbf532b95d6c5d7af6d