virtus

https://github.com/solnic/virtus

Ruby

Attributes on Steroids for Plain Old Ruby Objects

Virtus::ClassMethods#inherited

Setup descendants' own Attribute-accessor-method-hosting modules

Descendants inherit Attribute accessor methods via Ruby's inheritance
mechanism: Attribute accessor methods are defined in a module included
in a superclass. Attributes defined on descendants add methods to the
descendant's Attributes accessor module, leaving the superclass's method
table unaffected.

Source | Google | Stack overflow

Edit

git clone [email protected]:solnic/virtus.git

cd virtus

open lib/virtus/class_methods.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Virtus--ClassMethods-inherited-for-pr


# Commit to git

git add lib/virtus/class_methods.rbgit commit -m "better docs for Virtus::ClassMethods#inherited"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Virtus--ClassMethods-inherited-for-pr

hub pull-request


# Celebrate!