Sha256: ddbab12012a22b76cc55add3603c0e690ed5b849e36e583c224c826a1910cff7

Contents?: true

Size: 558 Bytes

Versions: 8

Compression:

Stored size: 558 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  class RestrictionService
    class << self
      private

      def presenter_class
        raise "RestrictionService is an Abstract class and should be extended. Implement presenter_class in the subclass"
      end

      def presenters(builder)
        response = repository.search(builder)
        response.documents.map { |d| presenter_class.new(d) }
      end

      def repository
        config.repository
      end

      def config
        @config ||= ::CatalogController.new
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hyrax-3.2.0 app/services/hyrax/restriction_service.rb
hyrax-3.1.0 app/services/hyrax/restriction_service.rb
hyrax-3.0.2 app/services/hyrax/restriction_service.rb
hyrax-3.0.1 app/services/hyrax/restriction_service.rb
hyrax-3.0.0 app/services/hyrax/restriction_service.rb
hyrax-3.0.0.pre.rc4 app/services/hyrax/restriction_service.rb
hyrax-3.0.0.pre.rc3 app/services/hyrax/restriction_service.rb
hyrax-3.0.0.pre.rc2 app/services/hyrax/restriction_service.rb