Sha256: 70ff45f8221a32364628ffa2ec6fc646d45b4110b31d6cf48b8bfd8b99496140

Contents?: true

Size: 1.26 KB

Versions: 3

Compression:

Stored size: 1.26 KB

Contents

module BlacklightOaiProvider
  autoload :Exceptions, 'blacklight_oai_provider/exceptions'
  autoload :SolrDocumentProvider, 'blacklight_oai_provider/solr_document_provider'
  autoload :SolrDocumentWrapper, 'blacklight_oai_provider/solr_document_wrapper'
  autoload :ResumptionToken, 'blacklight_oai_provider/resumption_token'
  autoload :Routes, 'blacklight_oai_provider/routes'
  autoload :Set, 'blacklight_oai_provider/set'
  autoload :Response, 'blacklight_oai_provider/response/list_sets'
  autoload :SolrSet, 'blacklight_oai_provider/solr_set'

  require 'oai'
  require 'blacklight_oai_provider/version'
  require 'blacklight_oai_provider/engine'

  @omit_inject = {}
  def self.omit_inject=(value)
    value = Hash.new(true) if value == true
    @omit_inject = value
  end

  def self.omit_inject
    @omit_inject
  end

  def self.inject!
    Blacklight::Routes.send(:include, BlacklightOaiProvider::Routes) unless BlacklightOaiProvider.omit_inject[:routes]
  end

  # Add element to array only if it's not already there
  def self.safe_arr_add(array, element)
    array << element unless array.include?(element)
  end

  # returns the full path the the blacklight plugin installation
  def self.root
    @root ||= File.expand_path(File.dirname(File.dirname(__FILE__)))
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blacklight_oai_provider-5.1.0 lib/blacklight_oai_provider.rb
blacklight_oai_provider-5.0.0 lib/blacklight_oai_provider.rb
blacklight_oai_provider-5.0.0.pre1 lib/blacklight_oai_provider.rb