Class: CanTango::Configuration::Registry::Role
- Inherits:
-
Base
- Object
- Base
- CanTango::Configuration::Registry::Role
- Defined in:
- lib/cantango/roles_ext/configuration/registry/role.rb
Direct Known Subclasses
Instance Method Summary collapse
- #clear! ⇒ Object
- #exclude(*names) ⇒ Object
- #excluded ⇒ Object
- #filter? ⇒ Boolean
- #onlies ⇒ Object
- #only(*names) ⇒ Object
Instance Method Details
#clear! ⇒ Object
25 26 27 28 29 |
# File 'lib/cantango/roles_ext/configuration/registry/role.rb', line 25 def clear! super @excluded = [] @onlies = [] end |
#exclude(*names) ⇒ Object
17 18 19 |
# File 'lib/cantango/roles_ext/configuration/registry/role.rb', line 17 def exclude *names @excluded = names.select_labels end |
#excluded ⇒ Object
13 14 15 |
# File 'lib/cantango/roles_ext/configuration/registry/role.rb', line 13 def excluded @excluded ||= [] end |
#filter? ⇒ Boolean
21 22 23 |
# File 'lib/cantango/roles_ext/configuration/registry/role.rb', line 21 def filter? !(excluded + onlies).empty? end |
#onlies ⇒ Object
9 10 11 |
# File 'lib/cantango/roles_ext/configuration/registry/role.rb', line 9 def onlies @onlies ||= [] end |
#only(*names) ⇒ Object
5 6 7 |
# File 'lib/cantango/roles_ext/configuration/registry/role.rb', line 5 def only *names @onlies = names.select_labels end |