Sha256: f96a886450bb459f1e8eadeb9902251a53b6025ec4db8c93dd43e607852fedb7

Contents?: true

Size: 613 Bytes

Versions: 44

Compression:

Stored size: 613 Bytes

Contents

# frozen_string_literal: true
module Blacklight
  module Routes
    class Exportable
      def initialize(defaults = {})
        @defaults = defaults
      end

      def call(mapper, options = {})
        options = @defaults.merge(options)

        mapper.member do
          mapper.match 'email', via: [:get, :post]
          mapper.match 'sms', via: [:get, :post]
          mapper.get 'citation'
        end

        mapper.collection do
          mapper.match 'email', via: [:get, :post]
          mapper.match 'sms', via: [:get, :post]
          mapper.get 'citation'
        end
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
blacklight-6.25.0 lib/blacklight/routes/exportable.rb
blacklight-6.24.0 lib/blacklight/routes/exportable.rb
blacklight-6.23.0 lib/blacklight/routes/exportable.rb
blacklight-6.22.0 lib/blacklight/routes/exportable.rb
blacklight-6.21.0 lib/blacklight/routes/exportable.rb
blacklight-6.20.0 lib/blacklight/routes/exportable.rb
blacklight-6.19.2 lib/blacklight/routes/exportable.rb
blacklight-6.19.1 lib/blacklight/routes/exportable.rb
blacklight-6.19.0 lib/blacklight/routes/exportable.rb
blacklight-6.18.0 lib/blacklight/routes/exportable.rb
blacklight-6.17.0 lib/blacklight/routes/exportable.rb
blacklight-6.16.0 lib/blacklight/routes/exportable.rb
blacklight-6.15.0 lib/blacklight/routes/exportable.rb
blacklight-7.0.0.rc1 lib/blacklight/routes/exportable.rb
blacklight-6.14.1 lib/blacklight/routes/exportable.rb
blacklight-6.14.0 lib/blacklight/routes/exportable.rb
blacklight-6.13.0 lib/blacklight/routes/exportable.rb
blacklight-6.12.0 lib/blacklight/routes/exportable.rb
blacklight-6.11.2 lib/blacklight/routes/exportable.rb
blacklight-6.11.1 lib/blacklight/routes/exportable.rb