class Traject::UMichFormat

Encapsulates logic that uses University of Michigan University Library rules to determine both bib format (book, serial, visual material, etc.) and type, a more expansive list including both format (blu-ray, microform) and more semantic categories (bibliography, conference)

Constants

VERSION

Attributes

bib_format[R]

@!attribute [r] record

The record passed into the constructor

@!attribute [r] bib_format

The bib format code as computed from the passed record

@!attribute [r] types

A (possibly empty) array of type codes as computed from record data
record[R]

@!attribute [r] record

The record passed into the constructor

@!attribute [r] bib_format

The bib format code as computed from the passed record

@!attribute [r] types

A (possibly empty) array of type codes as computed from record data
types[R]

@!attribute [r] record

The record passed into the constructor

@!attribute [r] bib_format

The bib format code as computed from the passed record

@!attribute [r] types

A (possibly empty) array of type codes as computed from record data

Public Class Methods

new(marc_record) click to toggle source

Construct a Formats object from the given record, calcuclating the bib_format and types

@param [MARC::Record] record

# File lib/traject/umich_format.rb, line 27
def initialize(marc_record)
  @record     = marc_record
  @bib_format = BibFormat.new(record).code
  @types      = BibTypes.new(@bib_format, record).codes
end

Public Instance Methods

format_and_types() click to toggle source
# File lib/traject/umich_format.rb, line 33
def format_and_types
  types = @types.dup
  types.unshift bib_format
  types.uniq!
  types
end