Class: CanTango::Configuration::Registry::Role

Inherits:
Base
  • Object
show all
Defined in:
lib/cantango/roles_ext/configuration/registry/role.rb

Direct Known Subclasses

System

Instance Method Summary collapse

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

#excludedObject



13
14
15
# File 'lib/cantango/roles_ext/configuration/registry/role.rb', line 13

def excluded
  @excluded ||= []
end

#filter?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/cantango/roles_ext/configuration/registry/role.rb', line 21

def filter?
  !(excluded + onlies).empty?
end

#onliesObject



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