class Blacklight::Routes::Exportable

Public Class Methods

new(defaults = {}) click to toggle source
# File lib/blacklight/routes/exportable.rb, line 6
def initialize(defaults = {})
  @defaults = defaults
end

Public Instance Methods

call(mapper, _options = {}) click to toggle source
# File lib/blacklight/routes/exportable.rb, line 10
def call(mapper, _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