module Traject::Macros::MarcFormats
To use the marc_format macro, in your configuration file:
require 'traject/macros/marc_format_classifier' extend Traject::Macros::MarcFormats to_field "format", marc_formats
See also MarcClassifier which can be used directly for a bit more control.
Public Instance Methods
marc_formats()
click to toggle source
very opionated macro that just adds a grab bag of format/genre/types from our own custom vocabulary, all into one field. You may want to build your own from MarcFormatClassifier
functions instead.
# File lib/traject/macros/marc_format_classifier.rb, line 17 def marc_formats lambda do |record, accumulator| accumulator.concat Traject::Macros::MarcFormatClassifier.new(record).formats end end