abrandoned / heredity

gem to provide class inheritable attributes outside of rails and other framework integrated mechanisms
MIT License
1 stars 3 forks source link

Don't run the included hook if the heredity has already been included #1

Closed liveh2o closed 12 years ago

liveh2o commented 12 years ago

...so that inheritable attributes aren't reset.

Fixes a problem where including the module multiple times (e.g. in separate modules that are then included into the same class where clobbering each other's inheritable attributes.

liveh2o commented 12 years ago

Meant for this to be a separate pull request, but...

Also added some sugar to make heredity a little easier to use. Now you can just include the Heredity module and it will include Heredity::InheritableClassInstanceVariables for you.