traject_umich_format 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b48d73e081182d5ff11cc4cea1feeb8c7399203
|
4
|
+
data.tar.gz: 2efd88bdcf70a50755ef9c8645157eab75f19701
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f434506d6395f923aa85cd52adf30857b7c8e9810af227db66196c1a5fd230a491f6012edd98a1c574ff47a7119b96984ba60f97926b5ab68917bc4284642dc8
|
7
|
+
data.tar.gz: 73c8a064b737ee6efea3ee31b97d8039f7a4257527d7f23fbf9ad1ec8d0295de419c991c44d6aaf1e8bfac34d2c6bb92a7b6121fa9fcce86af9e2d80a0e08b71
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: traject_umich_format
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bill Dueber
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -70,7 +70,6 @@ files:
|
|
70
70
|
- lib/traject/umich_format.rb
|
71
71
|
- lib/traject/umich_format/bib_format.rb
|
72
72
|
- lib/traject/umich_format/bib_types.rb
|
73
|
-
- lib/traject/umich_format/format_finder.rb
|
74
73
|
- lib/traject/umich_format/macros.rb
|
75
74
|
- lib/traject/umich_format/version.rb
|
76
75
|
- lib/traject/umich_format/xv6xx.rb
|
@@ -102,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
101
|
version: '0'
|
103
102
|
requirements: []
|
104
103
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.1.
|
104
|
+
rubygems_version: 2.1.9
|
106
105
|
signing_key:
|
107
106
|
specification_version: 4
|
108
107
|
summary: Extract the format and type from a MARC record, the UMich way
|
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'traject'
|
2
|
-
require 'traject/umich_format/bib_format'
|
3
|
-
require 'traject/umich_format/bib_types'
|
4
|
-
|
5
|
-
# Encapsulates logic that uses University of Michigan University Library
|
6
|
-
# rules to determine both bib format (book, serial, visual
|
7
|
-
# material, etc.) and type, a more expansive list including both format
|
8
|
-
# (blu-ray, microform) and more semantic categories (bibliography,
|
9
|
-
# conference)
|
10
|
-
|
11
|
-
class Traject::UMichFormat
|
12
|
-
|
13
|
-
|
14
|
-
# @!attribute [r] record
|
15
|
-
# The record passed into the constructor
|
16
|
-
# @!attribute [r] bib_format
|
17
|
-
# The bib format code as computed from the passed record
|
18
|
-
# @!attribute [r] types
|
19
|
-
# A (possibly empty) array of type codes as computed from record data
|
20
|
-
attr_reader :bib_format, :record, :types
|
21
|
-
|
22
|
-
# Construct a Formats object from the given record, calcuclating
|
23
|
-
# the bib_format and types
|
24
|
-
#
|
25
|
-
# @param [MARC::Record] record
|
26
|
-
def initialize(marc_record)
|
27
|
-
@record = marc_record
|
28
|
-
@bib_format = BibFormat.new(record).code
|
29
|
-
@types = BibTypes.new(record).codes
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|