role.js 406 B

1234567891011121314151617
  1. 'use strict'
  2. /*
  3. * Role
  4. *
  5. * A Role encapsulates a particular object's 'role' in a method's
  6. * dispatch. They are added directly to the selector for a method, and thus
  7. * do not prevent the objects a method was defined on from being garbage
  8. * collected.
  9. */
  10. module.exports = Role
  11. function Role (method, position) {
  12. this.method = method
  13. this.position = position
  14. }
  15. Role.roleKeyName = Symbol('roles')