Module: Qa::Authorities::Local
Defined Under Namespace
Classes: FileBasedAuthority, Registry
Class Method Summary
collapse
new, subauthorities, subauthority_class, subauthority_for, validate_subauthority!
names, subauthorities_path
Class Method Details
.register_subauthority(subauthority, class_name) ⇒ Object
22
23
24
|
# File 'lib/qa/authorities/local.rb', line 22
def self.register_subauthority(subauthority, class_name)
registry.add(subauthority, class_name)
end
|
.registry ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/qa/authorities/local.rb', line 13
def self.registry
@registry ||= begin
Registry.new do |reg|
register_defaults(reg)
end
end
end
|
.subauthorities ⇒ Object
26
27
28
|
# File 'lib/qa/authorities/local.rb', line 26
def self.subauthorities
registry.keys
end
|
.subauthority_for(subauthority) ⇒ Object
8
9
10
11
|
# File 'lib/qa/authorities/local.rb', line 8
def self.subauthority_for(subauthority)
validate_subauthority!(subauthority)
registry.instance_for(subauthority)
end
|