Module: Qa::Authorities::Oclcts

Extended by:
AuthorityWithSubAuthority
Defined in:
lib/qa/authorities/oclcts.rb

Defined Under Namespace

Classes: GenericOclcAuthority

Constant Summary collapse

SRU_SERVER_CONFIG =
YAML.load_file(Rails.root.join("config", "oclcts-authorities.yml"))

Class Method Summary collapse

Methods included from AuthorityWithSubAuthority

new, subauthorities, subauthority_class, subauthority_for, validate_subauthority!

Class Method Details

.subauthoritiesObject



16
17
18
# File 'lib/qa/authorities/oclcts.rb', line 16

def self.subauthorities
  SRU_SERVER_CONFIG["authorities"].map { |subauthority| subauthority[0] }
end

.subauthority_for(subauthority) ⇒ Object



9
10
11
12
# File 'lib/qa/authorities/oclcts.rb', line 9

def self.subauthority_for(subauthority)
  validate_subauthority!(subauthority)
  GenericOclcAuthority.new(subauthority)
end

.url_pattern(query_type) ⇒ Object



20
21
22
# File 'lib/qa/authorities/oclcts.rb', line 20

def self.url_pattern(query_type)
  SRU_SERVER_CONFIG["url-pattern"][query_type]
end