Sha256: d7d9e2c725ccaa3faadc6a190e02c7582432b7cb095bf6624e963d9b2d0740ca
Contents?: true
Size: 984 Bytes
Versions: 1
Compression:
Stored size: 984 Bytes
Contents
module Qa::Authorities class Local < Qa::Authorities::Base extend Deprecation attr_accessor :results class << self def sub_authority(name) @sub_authorities ||= {} raise ArgumentError, "Invalid sub-authority '#{name}'" unless Subauthority.names.include?(name) @sub_authorities[name] ||= Subauthority.new(name) end def sub_authorities Subauthority.names end def terms(sub_authority) sub_authority(sub_authority).terms end end delegate :sub_authority, to: self def search(q, sub_authority) @results = sub_authority(sub_authority).search(q) end def full_record(id, sub_authority) sub_authority(sub_authority).full_record(id) end def get_full_record(id, sub_authority) Deprecation.warn(Local, "get_full_record is deprecated and will be removed in 0.1.0. Use full_record instead", caller) full_record(id, sub_authority) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
qa-0.3.0 | lib/qa/authorities/local.rb |