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

pulibrary / bibdata / f04bc944-f9b4-4a42-8b26-dcacd0e3e688

11 Mar 2025 10:27PM UTC coverage: 34.017% (-58.1%) from 92.162%
f04bc944-f9b4-4a42-8b26-dcacd0e3e688

Pull #2653

circleci

christinach
Add new lc_subject_facet field.
Helps with the vocabulary work https://github.com/pulibrary/orangelight/pull/3386
In this new field we index only the lc subject heading and the subdivisions
So that when the user searches using the Details section, they can query solr for
all the subject headings and their divisions.

This is needed for the Subject browse Vocabulary work.
example: "lc_subject_facet": [
             "Booksellers and bookselling—Italy—Directories",
             "Booksellers and bookselling-Italy",
             "Booksellers and bookselling"
              ]
Pull Request #2653: Add new lc_subject_facet field.

1 of 3 new or added lines in 1 file covered. (33.33%)

2215 existing lines in 93 files now uncovered.

1294 of 3804 relevant lines covered (34.02%)

0.99 hits per line

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

16.28
/marc_to_solr/lib/format/bib_types.rb
1
require 'traject/macros/marc21_semantics'
1✔
2
require_relative '../format/xv6xx'
1✔
3

4
# Determine the "types" of material represented by the bib record.
5
# The comments below come from the Ex Libris Aleph system and represent
6
# the logic used within it to determine types. This file is based
7
# on the logic use at the University of Michigan
8

9
class BibTypes
1✔
10
  attr_reader :bib_format, :record
1✔
11

12
  def initialize(bib_format, record)
1✔
UNCOV
13
    @bib_format = bib_format
×
UNCOV
14
    @record = record
×
15
    # Memoize values, since many of them are used several times
UNCOV
16
    @spec_vals = Hash.new { |h, spec_string| h[spec_string] = Traject::MarcExtractor.new(spec_string).extract(@record) }
×
17

18
    # Need these a lot -- the sub x and v from any 6XX field
UNCOV
19
    @xv6XX = XV6XX.new(@record)
×
20
  end
21

22
  def codes
1✔
UNCOV
23
    codes = []
×
UNCOV
24
    codes.concat self.video_types
×
UNCOV
25
    codes.concat self.audio_types
×
UNCOV
26
    codes.concat self.microform_types
×
UNCOV
27
    codes.concat self.musical_score_types
×
UNCOV
28
    codes.concat self.map_types
×
UNCOV
29
    codes.concat self.serial_types
×
UNCOV
30
    codes.concat self.mixed_types
×
UNCOV
31
    codes.concat self.software_types
×
UNCOV
32
    codes.concat self.statistics_types
×
UNCOV
33
    codes.concat self.conference_types
×
UNCOV
34
    codes.concat self.biography_types
×
UNCOV
35
    codes.concat self.reference_types
×
UNCOV
36
    codes.concat self.pp_types
×
UNCOV
37
    codes.concat self.videogame_types
×
38

UNCOV
39
    codes.uniq!
×
UNCOV
40
    codes.compact!
×
41

UNCOV
42
    codes
×
43
  end
44

45
  # Provide memoized values for on-the-fly created MarcExtractor
46
  # objects
47
  #
48
  # @param [String] spec_string A Traject::MarcExtractor-compatible spec string
49
  # @return [Array<String>] The strings in the specified subfields/byterange/whatever
50
  def [](spec_string)
1✔
UNCOV
51
    @spec_vals[spec_string]
×
52
  end
53

54
  ### Video stuff
55

56
  # TYP   VB Video (Blu-ray)                538## a          MATCH      *Blu-ray*
57
  # TYP   VB Video (Blu-ray)                007   F00-05     MATCH      v???s
58
  # TYP   VB Video (Blu-ray)                250## a          MATCH      *Blu-ray*
59
  # TYP   VB Video (Blu-ray)                852## j          MATCH      video-b*
60
  # TYP   VB Video (Blu-ray)                852## j          MATCH      bd-rom*
61
  #
62
  # TYP   VD Video (DVD)                    538## a          MATCH      DVD*
63
  # TYP   VD Video (DVD)                    007   F04-01     EQUAL      v
64
  #                                         007   F00-01     EQUAL      v
65
  # TYP   VD Video (DVD)                    007   F04-01     EQUAL      v
66
  #                                         008   F33-01     EQUAL      v
67
  # !
68
  # ! Visual material: vHs
69
  # TYP   VH Video (VHS)                    538## a          MATCH      VHS*
70
  # TYP   VH Video (VHS)                    007   F04-01     EQUAL      b
71
  #                                         007   F00-01     EQUAL      v
72
  # TYP   VH Video (VHS)                    007   F04-01     EQUAL      b
73
  #                                         008   F33-01     EQUAL      v
74
  # !
75
  # ! Visual materials: fiLm/video
76
  # TYP   VL Motion Picture                 007   F00-01     EQUAL      m
77
  # TYP   VL Motion Picture                 FMT   F00-02     EQUAL      VM
78
  #                                         008   F33-01     EQUAL      m
79

80
  def video_types
1✔
UNCOV
81
    types = []
×
82

UNCOV
83
    types << 'VB' if self['538a:250a'].grep(/blu-ray/i).size > 0
×
UNCOV
84
    types << 'VB' if self['007[0-5]'].grep(/v...s/i).size > 0
×
UNCOV
85
    types << 'VB' if self['852j'].grep(/\A(?:bd-rom|video-b)/i).size > 0
×
86

UNCOV
87
    @record.fields('007').map { |f| f.value }.each do |f|
×
UNCOV
88
      if (f[0] == 'v') || self['008[33]'].include?('v')
×
UNCOV
89
        types << 'VD' if f[4] == 'v'
×
UNCOV
90
        types << 'VH' if f[4] == 'b'
×
91
      end
92
    end
93

UNCOV
94
    types << 'VD' if self['538a'].grep(/\Advd(?!-rom)/i).size > 0
×
95

UNCOV
96
    types << 'VH' if self['538a'].grep(/\AVHS/i).size > 0
×
97

UNCOV
98
    types << 'VL' if self['007[0]'].include?('m')
×
UNCOV
99
    types << 'VL' if (self.bib_format == 'VM') && self['008[33]'].include?('m')
×
100

UNCOV
101
    types.uniq!
×
UNCOV
102
    return types
×
103
  end
104

105
  # Audio/music
106
  # ! Recording: Compact disc
107
  # TYP   RC Audio CD                       LDR   F06-01     EQUAL      [i,j]
108
  #                                         FMT   F00-02     EQUAL      MU
109
  #                                         007   F01-01     EQUAL      d
110
  #                                         007   F12-01     EQUAL      e
111
  # TYP   RC Audio CD                       8524  j          MATCH      CD*
112
  #                                         8524  b          EQUAL      MUSIC
113
  # !
114
  # ! Recording: LP record
115
  # TYP   RL Audio LP                       LDR   F06-01     EQUAL      [i,j]
116
  #                                         FMT   F00-02     EQUAL      MU
117
  #                                         007   F01-01     EQUAL      d
118
  #                                         300   a          MATCH      *SOUND DISC*
119
  #                                         300   b          MATCH      *33 1/3 RPM*
120
  #
121
  # TYP   RL Audio LP                       8524  j          MATCH      LP*
122
  #                                         8524  c          EQUAL      MUSI
123
  # TYP   RL Audio LP                       8524  j          MATCH      LP*
124
  #                                         8524  b          EQUAL      MUSIC
125
  # !
126
  # ! Recording: Music
127
  # TYP   RM Audio (music)                  LDR   F06-01     EQUAL      j
128
  #                                         FMT   F00-02     EQUAL      MU
129
  # !
130
  # ! Recording: Spoken word
131
  # TYP   RS Audio (spoken word)            LDR   F06-01     EQUAL      i
132
  #                                         FMT   F00-02     EQUAL      MU
133
  # !
134
  # ! Recording: Undefined
135
  # TYP   RU Audio                          LDR   F06-01     EQUAL      [i,j]
136
  #                                         FMT   F00-02     EQUAL      MU
137
  #
138

139
  def audio_types
1✔
UNCOV
140
    ldr6 = record.leader[6]
×
141

UNCOV
142
    types = []
×
143

144
    # Get the 8524* fields
UNCOV
145
    f8524 = record.fields('852').select { |f| f.indicator1 == '4' }
×
146

147
    # RC
UNCOV
148
    if %w[i j].include?(ldr6) && (bib_format == 'MU')
×
149
      @record.fields('007').map { |f| f.value }.each do |f|
×
150
        if f[1] == 'd' && f[12] == 'e'
×
151
          types << 'RC'
×
152
          break
×
153
        end
154
      end
155
    end
156

UNCOV
157
    f8524.each do |f|
×
158
      if (f['b']&.upcase == 'MUSIC') && (f['j'] =~ /\ACD/i)
×
159
        types << 'RC'
×
160
        break
×
161
      end
162
    end
163

164
    # RL
165

UNCOV
166
    if (bib_format == 'MU') && %w[i j].include?(ldr6) && self['007[1]'].include?('d')
×
167
      record.fields('300').each do |f|
×
168
        str = f.subfields.collect { |s| s.value }.join(' ')
×
169
        if (str =~ /DISC/i) && str =~ %r{33 1/3 RPM}i
×
170
          types << 'RL'
×
171
          break
×
172
        end
173
      end
174
    end
175

UNCOV
176
    f8524.each do |f|
×
177
      if  (f['j'] =~ /\ALP/i) &&
×
178
          ((f['b'].upcase == 'MUSIC') || (f['c'].upcase == 'MUSI'))
×
179
        types << 'RL'
×
180
        break
×
181
      end
182
    end
183

184
    # RM
UNCOV
185
    types << 'RM' if (ldr6 == 'j') && (bib_format == 'MU')
×
186

187
    # RS
UNCOV
188
    types << 'RS' if (ldr6 == 'i') && (bib_format == 'MU')
×
189

190
    # RU
UNCOV
191
    types << 'RU' if %w[i j].include?(ldr6) && (bib_format == 'MU')
×
192

UNCOV
193
    types.uniq!
×
UNCOV
194
    return types
×
195
  end
196

197
  # Microform
198
  # ! MicroForms
199
  # TYP   WM Microform                      FMT   F00-02     EQUAL      BK
200
  #                                         008   F23-01     EQUAL      [a,b,c]
201
  # TYP   WM Microform                      FMT   F00-02     EQUAL      MU
202
  #                                         008   F23-01     EQUAL      [a,b,c]
203
  # TYP   WM Microform                      FMT   F00-02     EQUAL      SE
204
  #                                         008   F23-01     EQUAL      [a,b,c]
205
  # TYP   WM Microform                      FMT   F00-02     EQUAL      MX
206
  #                                         008   F23-01     EQUAL      [a,b,c]
207

208
  # TYP   WM Microform                      245## h          MATCH      *micro*
209

210
  # TYP   WM Microform                      FMT   F00-02     EQUAL      MP
211
  #                                         008   F29-01     EQUAL      [a,b,c]
212
  # TYP   WM Microform                      FMT   F00-02     EQUAL      VM
213
  #                                         008   F29-01     EQUAL      [a,b,c]
214

215
  def microform_types
1✔
UNCOV
216
    return [] unless record['008']
×
217

UNCOV
218
    types = ['WM']
×
UNCOV
219
    f8_23 = record['008'].value[23]
×
UNCOV
220
    return types if %w[BK MU SE MX].include?(bib_format) && %w[a b c].include?(f8_23)
×
221

UNCOV
222
    f8_29 = record['008'].value[29]
×
UNCOV
223
    return types if %w[MP VM].include?(bib_format) && %w[a b c].include?(f8_29)
×
224

UNCOV
225
    return types if record['245'] && (record['245']['h'] =~ /micro/i)
×
226

227
    # Nope. Not microform
UNCOV
228
    return []
×
229
  end
230

231
  # ! Musical Score
232
  # TYP   MS Musical Score                  LDR   F06-01     EQUAL      [c,d]
233

234
  def musical_score_types
1✔
UNCOV
235
    types = []
×
UNCOV
236
    types << 'MS' if %w[c d].include?(record.leader[6])
×
UNCOV
237
    return types
×
238
  end
239

240
  # ! Maps: Numerous
241
  # TYP   MN Maps-Atlas                     FMT   F00-02     EQUAL      MP
242
  # TYP   MN Maps-Atlas                     LDR   F06-01     EQUAL      [e,f]
243
  # TYP   MN Maps-Atlas                     007   F00-01     EQUAL      a
244
  # !
245
  # ! Maps: One (commented out as per Judy Ahronheim as this TYP duplicates MN)
246
  # !TYP   MO Map                            FMT   F00-02     EQUAL      MP
247
  # !TYP   MO Map                            007   F00-01     EQUAL      a
248

249
  def map_types
1✔
UNCOV
250
    types = []
×
UNCOV
251
    types << 'MN' if (bib_format == 'MP') || %w[e f].include?(record.leader[6]) || self['007[0]'].include?('a')
×
UNCOV
252
    return types
×
253
  end
254

255
  # Serials
256
  # ! serial: A Journal
257
  # TYP   AJ Journal                        FMT   F00-02     EQUAL      SE
258
  #                                         008   F21-01     EQUAL      p
259
  #                                         008   F22-01     EQUAL      [^,a,b,c,d,f,g,h,i,s,x,z,|]
260
  #                                         008   F29-01     EQUAL      [0,|]
261
  # TYP   AJ Journal                        FMT   F00-02     EQUAL      SE
262
  #                                         008   F21-01     EQUAL      [^,d,l,m,p,w,|]
263
  #                                         008   F22-01     EQUAL      [^,a,b,c,d,f,g,h,i,s,x,z,|]
264
  #                                         008   F24-01     EQUAL      [a,b,g,m,n,o,p,s,w,x,y,^]
265
  #                                         008   F29-01     EQUAL      [0,|]
266
  # !
267
  # ! serial: A Newspaper
268
  # TYP   AN Newspaper                      FMT   F00-02     EQUAL      SE
269
  #                                         008   F21-01     EQUAL      n
270
  # TYP   AN Newspaper                      FMT   F00-02     EQUAL      SE
271
  #                                         008   F22-01     EQUAL      e
272
  #
273
  # ! serial: All, including serials with other FMT codes
274
  # TYP   SX All Serials                    LDR   F07-01     EQUAL      [b,s]
275

276
  # Wrap it all up in serial_types
277
  def serial_types
1✔
UNCOV
278
    types = []
×
UNCOV
279
    types << 'SX' if %w[b s].include?(record.leader[7])
×
UNCOV
280
    types.concat journal_types
×
UNCOV
281
    types.concat newspaper_types
×
UNCOV
282
    types.uniq!
×
UNCOV
283
    return types
×
284
  end
285

286
  def journal_types
1✔
UNCOV
287
    types = []
×
288
    # gotta be SE and have a 008
UNCOV
289
    return types unless (bib_format == 'SE') && record['008']
×
290

291
    # We need lots of chars from the 008
292
    f8 = record['008'].value
×
293

294
    if  (f8[21] == 'p') &&
×
295
        [' ', 'a', 'b', 'c', 'd', 'f', 'g', 'h', 'i', 's', 'x', 'z', '|'].include?(f8[22]) &&
296
        ['0', '|'].include?(f8[29])
297
      types << 'AJ'
×
298
    end
299

300
    if  [' ', 'd', 'l', 'm', 'p', 'w', '|'].include?(f8[21]) &&
×
301
        [' ', 'a', 'b', 'c', 'd', 'f', 'g', 'h', 'i', 's', 'x', 'z', '|'].include?(f8[22]) &&
302
        ['a', 'b', 'g', 'm', 'n', 'o', 'p', 's', 'w', 'x', 'y', ' '].include?(f8[24]) &&
303
        ['0', '|'].include?(f8[29])
304
      types << 'AJ'
×
305
    end
306

307
    types.uniq!
×
308
    return types
×
309
  end
310

311
  def newspaper_types
1✔
UNCOV
312
    types = []
×
UNCOV
313
    types << 'AN' if (bib_format == 'SE') && record['008'] &&
×
314
                     ((record['008'].value[21] == 'n') || (record['008'].value[22] == 'e'))
×
UNCOV
315
    return types
×
316
  end
317

318
  # ! Mixed material: archi-V-e
319
  # TYP   MV Archive                        FMT   F00-02     EQUAL      MX
320
  # TYP   MV Archive                        LDR   F08-01     EQUAL      a
321
  # !
322
  # ! Mixed material: manuscript
323
  # TYP   MW Manuscript                     LDR   F06-01     EQUAL      [d,f,p,t]
324

325
  def mixed_types
1✔
UNCOV
326
    types = []
×
UNCOV
327
    types << 'MV' if (bib_format == 'MX') || (record.leader[8] == 'a')
×
UNCOV
328
    types << 'MW' if %w[d f p t].include?(record.leader[6])
×
UNCOV
329
    return types
×
330
  end
331

332
  # TYP   CR CDROM                          852## j          MATCH      cd-rom*
333
  # TYP   CR CDROM                          852## j          MATCH      cdrom*
334
  # TYP   CR CDROM                          852## j          MATCH      cd-rom*
335
  # TYP   CS Software                       852## j          MATCH      software*
336

337
  def software_types
1✔
UNCOV
338
    types = []
×
UNCOV
339
    self['852j'].each do |j|
×
UNCOV
340
      types << 'CR' if /\Acd-?rom/i.match?(j)
×
UNCOV
341
      types << 'CS' if /\Asoftware/i.match?(j)
×
342
    end
UNCOV
343
    types.uniq!
×
UNCOV
344
    return types
×
345
  end
346

347
  # ! X (no icon) - Conference
348
  # TYP   XC Conference                     008   F29-01     EQUAL      1
349
  # TYP   XC Conference                     111##            EXIST
350
  # TYP   XC Conference                     711##            EXIST
351
  # TYP   XC Conference                     811##            EXIST
352
  # TYP   XC Conference                     FMT   F00-02     EQUAL      CF
353
  #                                         006   F00-01     EQUAL      [a,s]
354
  #                                         006   F12-01     EQUAL      1
355
  # TYP   XC Conference                     FMT   F00-02     EQUAL      MU
356
  #                                         008   F30-01     EQUAL      c
357
  # TYP   XC Conference                     FMT   F00-02     EQUAL      MU
358
  #                                         008   F31-01     EQUAL      c
359
  # ! additional types defined for vufind extract
360
  # TYP   XC Conference                     6#### xv         MATCH      *congresses*
361

362
  def conference_types
1✔
363
    # Get the easy stuff done first
364

UNCOV
365
    return ['XC'] if (record['008'] && (record['008'].value[29] == '1')) || record.fields(%w[111 711 811]).size > 0
×
366

UNCOV
367
    if (bib_format == 'CF')
×
368
      @record.fields('006').map { |f| f.value }.each do |f|
×
369
        return ['XC'] if %w[a s].include?(f[0]) && (f[12] == '1')
×
370
      end
371
    end
372

UNCOV
373
    if  (bib_format == 'MU') && record['008'] &&
×
374
        (record['008'].value[30..31] =~ /c/)
×
375
      return ['XC']
×
376
    end
377

UNCOV
378
    return ['XC'] if @xv6XX.match?(/congresses/i)
×
379

380
    # Nope.
UNCOV
381
    return []
×
382
  end
383

384
  # ! X (no icon) - Statistics
385
  # TYP   XS Statistics                     650## x          MATCH      Statistic*
386
  # TYP   XS Statistics                     6#### x          MATCH      Statistic*
387
  # TYP   XS Statistics                     6#### v          MATCH      Statistic*
388
  # TYP   XS Statistics                     FMT   F00-02     EQUAL      BK
389
  #                                         008   F24-01     EQUAL      s
390
  # TYP   XS Statistics                     FMT   F00-02     EQUAL      BK
391
  #                                         008   F25-01     EQUAL      s
392
  # TYP   XS Statistics                     FMT   F00-02     EQUAL      BK
393
  #                                         008   F26-01     EQUAL      s
394
  # TYP   XS Statistics                     FMT   F00-02     EQUAL      BK
395
  #                                         008   F27-01     EQUAL      s
396

397
  def statistics_types
1✔
UNCOV
398
    return ['XS'] if bib_format == 'BK' && (record['008'] && record['008'].value[24..27] =~ /s/)
×
399

UNCOV
400
    return ['XS'] if @xv6XX.match?(/\AStatistic/i)
×
401

402
    # Nope
UNCOV
403
    return []
×
404
  end
405

406
  # TYP   EN Encyclopedias                  6#### xv         MATCH      *encyclopedias*
407
  # TYP   EN Encyclopedias                  008   F24-01     EQUAL      e
408
  # TYP   EN Encyclopedias                  006   F07-01     EQUAL      e
409
  #
410
  # TYP   DI Dictionaries                   6#### xv         MATCH      *dictionaries*
411
  # TYP   DI Dictionaries                   008   F24-01     EQUAL      d
412
  # TYP   DI Dictionaries                   006   F07-01     EQUAL      d
413
  #
414
  # TYP   DR Directories                    6#### xv         MATCH      *directories*
415
  # TYP   DR Directories                    008   F24-01     EQUAL      r
416
  # TYP   DR Directories                    006   F07-01     EQUAL      d
417

418
  def reference_types
1✔
UNCOV
419
    types = []
×
420

421
    # Will need the 008[24] and 006[7]
UNCOV
422
    f8_24 = self['008[24]']
×
UNCOV
423
    f6_7 = self['006[7]']
×
424

UNCOV
425
    types << 'EN' if (f8_24.include? 'e') || (f6_7.include? 'e')
×
426

UNCOV
427
    if f6_7.include? 'd'
×
UNCOV
428
      types << 'DI'
×
UNCOV
429
      types << 'DR'
×
430
    end
431

UNCOV
432
    types << 'DI' if f8_24.include? 'd'
×
433

UNCOV
434
    types << 'DR' if f8_24.include? 'r'
×
435

UNCOV
436
    types << 'EN' if @xv6XX.match?(/encyclopedias/i)
×
UNCOV
437
    types << 'DI' if @xv6XX.match?(/dictionaries/i)
×
UNCOV
438
    types << 'DR' if @xv6XX.match?(/directories/i)
×
439

UNCOV
440
    types.uniq!
×
UNCOV
441
    return types
×
442
  end
443

444
  # TYP   BI Biography                      6#### xv         MATCH      *biography*
445
  # TYP   BI Biography                      6#### xv         MATCH      *diaries*
446
  # TYP   BI Biography                      008   F34-01     EQUAL      [a,b,c]
447
  # TYP   BI Biography                      006   F17-01     EQUAL      [a,b,c]
448

449
  def biography_types
1✔
UNCOV
450
    return ['BI'] if record['008'] && %w[a b c].include?(record['008'].value[34])
×
UNCOV
451
    return ['BI'] if (%w[a b c] & self['006[17]']).size > 0
×
452

UNCOV
453
    return ['BI'] if @xv6XX.match?(/(?:biography|diaries)/i)
×
454

455
    # Nope
UNCOV
456
    return []
×
457
  end
458

459
  # TYP   PP Photographs & Pictorial Works  6#### xv         MATCH      pictorial works
460
  # TYP   PP Photographs & Pictorial Works  6#### xv         MATCH      views
461
  # TYP   PP Photographs & Pictorial Works  6#### xv         MATCH      photographs
462
  # TYP   PP Photographs & Pictorial Works  6#### xv         MATCH      in art
463
  # TYP   PP Photographs & Pictorial Works  6#### xv         MATCH      aerial views
464
  # TYP   PP Photographs & Pictorial Works  6#### xv         MATCH      aerial photographs
465
  # TYP   PP Photographs & Pictorial Works  6#### xv         MATCH      art
466
  # TYP   PP Photographs & Pictorial Works  6#### xv         MATCH      cariacatures and cartoons
467
  # TYP   PP Photographs & Pictorial Works  6#### xv         MATCH      comic books
468
  # TYP   PP Photographs & Pictorial Works  6#### xv         MATCH      illustrations
469
  # TYP   PP Photographs & Pictorial Works  6#### xv         MATCH      drawings
470
  # TYP   PP Photographs & Pictorial Works  6#### xv         MATCH      slides
471

472
  class << self
1✔
473
    attr_accessor :pp_regexp
1✔
474
  end
475

476
  self.pp_regexp = Regexp.union ['pictorial works',
1✔
477
                                 'views',
478
                                 'photographs',
479
                                 'in art',
480
                                 'aerial views',
481
                                 'aerial photographs',
482
                                 'cariacatures and cartoons',
483
                                 'comic books',
484
                                 'illustrations',
485
                                 'drawings',
486
                                 'slides'].map { |s| Regexp.new('\b' + s + '\b', true) }
11✔
487
  self.pp_regexp = Regexp.union(self.pp_regexp, /\bart\b/i)
1✔
488

489
  def pp_types
1✔
UNCOV
490
    if @xv6XX.match? self.class.pp_regexp
×
UNCOV
491
      return ['PP']
×
492
    else
UNCOV
493
      return []
×
494
    end
495
  end
496

497
  # TYP   VG Video Games                    FMT   F00-02     EQUAL      CF
498
  #                                         008   F26-01     EQUAL      g
499

500
  def videogame_types
1✔
UNCOV
501
    if (bib_format == 'CF') && (self['008[26]'].include? 'g')
×
502
      return ['VG']
×
503
    else
UNCOV
504
      return []
×
505
    end
506
  end
507
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