Skip to content

Instantly share code, notes, and snippets.

@exodist
Created May 24, 2012 04:06
Show Gist options
  • Save exodist/2779359 to your computer and use it in GitHub Desktop.
Save exodist/2779359 to your computer and use it in GitHub Desktop.
Composition
Role Composition:
* Adopt all attributes of sub-roles, error on conflict
* Adopt all requirements of sub-roles, except those met by this role.
* Adopt all methods of sub-roles, add conflicts to required
* Merge roles hash (squash config)
Type Composition:
* Adopt all attributes of roles, error on conflict
* For each role
* bring in role methods, exclude those also listed as a requirement
* conflicts are ignored, local methods are overrides
* Build attribute methods, error on conflict
* Ensure all requirements are met
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment