Sha256: fe49c57ae6b4997b8c0c62fb603414c52b73f104f789e90e3bfc64d3c318c576

Contents?: true

Size: 792 Bytes

Versions: 37

Compression:

Stored size: 792 Bytes

Contents

# Encapsulate information about assignFAST subauthorities
module Qa::Authorities::AssignFastSubauthority
  # Hash of subauthority names used in qa routes => 'index' used by API
  SUBAUTHORITIES = {
    'all'        => 'suggestall',
    'personal'   => 'suggest00',
    'corporate'  => 'suggest10',
    'event'      => 'suggest11',
    'uniform'    => 'suggest30',
    'topical'    => 'suggest50',
    'geographic' => 'suggest51',
    'form_genre' => 'suggest55'
  }.freeze

  # Get a list of subauthorities by name
  #
  # @return [Array<String>]
  def subauthorities
    SUBAUTHORITIES.keys
  end

  # Get an API index name from an English name
  #
  # @param [String] English name
  # @return [String] index name
  def index_for_authority(authority)
    SUBAUTHORITIES[authority]
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
qa-5.14.0 lib/qa/authorities/assign_fast_subauthority.rb
qa-5.13.0 lib/qa/authorities/assign_fast_subauthority.rb
qa-5.12.0 lib/qa/authorities/assign_fast_subauthority.rb
qa-5.11.0 lib/qa/authorities/assign_fast_subauthority.rb
qa-5.10.0 lib/qa/authorities/assign_fast_subauthority.rb
qa-5.9.0 lib/qa/authorities/assign_fast_subauthority.rb
qa-5.8.1 lib/qa/authorities/assign_fast_subauthority.rb
qa-5.8.0 lib/qa/authorities/assign_fast_subauthority.rb
qa-5.7.0 lib/qa/authorities/assign_fast_subauthority.rb
qa-5.6.0 lib/qa/authorities/assign_fast_subauthority.rb
qa-5.5.2 lib/qa/authorities/assign_fast_subauthority.rb
qa-4.3.0 lib/qa/authorities/assign_fast_subauthority.rb
qa-3.1.0 lib/qa/authorities/assign_fast_subauthority.rb
qa-2.3.0 lib/qa/authorities/assign_fast_subauthority.rb
qa-5.5.1 lib/qa/authorities/assign_fast_subauthority.rb
qa-5.5.0 lib/qa/authorities/assign_fast_subauthority.rb
qa-5.4.0 lib/qa/authorities/assign_fast_subauthority.rb
qa-5.3.1 lib/qa/authorities/assign_fast_subauthority.rb
qa-5.3.0 lib/qa/authorities/assign_fast_subauthority.rb
qa-5.2.0 lib/qa/authorities/assign_fast_subauthority.rb