Class: Blacklight::Marc::Routes::MarcViewable

Inherits:
Object
  • Object
show all
Defined in:
lib/blacklight/marc/routes/marc_viewable.rb

Instance Method Summary collapse

Constructor Details

#initialize(defaults = {}) ⇒ MarcViewable

Returns a new instance of MarcViewable.



6
7
8
# File 'lib/blacklight/marc/routes/marc_viewable.rb', line 6

def initialize(defaults = {})
  @defaults = defaults
end

Instance Method Details

#call(mapper, options = {}) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/blacklight/marc/routes/marc_viewable.rb', line 10

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

  mapper.member do
    mapper.match 'librarian_view', via: :get
  end
end