• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / bibdata / b3c4a532-5da0-46f8-9c20-20018605a028

21 Mar 2025 08:11PM UTC coverage: 42.257% (-49.9%) from 92.185%
b3c4a532-5da0-46f8-9c20-20018605a028

push

circleci

sandbergja
Move various gems from the default Gemfile group to a more appropriate group

1599 of 3784 relevant lines covered (42.26%)

2.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/marc_to_solr/lib/format.rb
1
require_relative './format/bib_format'
1✔
2
require_relative './format/bib_types'
1✔
3

4
# Adapted from: https://github.com/billdueber/traject_umich_format
5
class Format
1✔
6
  # @!attribute [r] record
7
  #   The record passed into the constructor
8
  # @!attribute [r] bib_format
9
  #   The bib format code as computed from the passed record
10
  # @!attribute [r] types
11
  #   A (possibly empty) array of type codes as computed from record data
12
  attr_reader :bib_format, :record, :types
1✔
13

14
  # Construct a Formats object from the given record, calcuclating
15
  # the bib_format and types
16
  #
17
  # @param [MARC::Record] record
18
  def initialize(marc_record)
1✔
19
    @record     = marc_record
×
20
    @bib_format = BibFormat.new(record).code
×
21
    @types      = BibTypes.new(@bib_format, record).codes
×
22
  end
23

24
  def format_and_types
1✔
25
    types = @types.dup
×
26
    types.unshift bib_format
×
27
    types
×
28
  end
29
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc