Sha256: 305cb125fdbaee1dfddf40a70e7dc7c73bc3be50bc1f99f2fea141db8d161aa8

Contents?: true

Size: 1019 Bytes

Versions: 4

Compression:

Stored size: 1019 Bytes

Contents

require 'traject'
require 'traject/umich_format/bib_format'
require 'traject/umich_format/bib_types'

# 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)

class Traject::UMichFormat


  # @!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
  attr_reader :bib_format, :record, :types

  # Construct a Formats object from the given record, calcuclating
  # the bib_format and types
  #
  # @param [MARC::Record] record
  def initialize(marc_record)
    @record     = marc_record
    @bib_format = BibFormat.new(record).code
    @types      = BibTypes.new(record).codes
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
traject_umich_format-0.1.3 lib/traject/umich_format/format_finder.rb
traject_umich_format-0.1.2 lib/traject/umich_format/format_finder.rb
traject_umich_format-0.1.1 lib/traject/umich_format/format_finder.rb
traject_umich_format-0.1.0 lib/traject/umich_format/format_finder.rb