enhanced_marc 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/enhanced_marc.gemspec +1 -1
- data/lib/enhanced_marc/record.rb +8 -3
- metadata +3 -3
data/enhanced_marc.gemspec
CHANGED
data/lib/enhanced_marc/record.rb
CHANGED
@@ -86,13 +86,18 @@ module MARC
|
|
86
86
|
unless self['008'].value[35,3].empty?
|
87
87
|
languages << Locale::Info.get_language(self['008'].value[35,3])
|
88
88
|
end
|
89
|
-
@fields.each_by_tag("041")
|
89
|
+
@fields.each_by_tag("041") do | oh_four_one |
|
90
90
|
langs = oh_four_one.find_all { |sub| sub.code == 'a'}
|
91
91
|
langs.each do | lang |
|
92
|
-
|
92
|
+
i = 0
|
93
|
+
while (i + 3) <= lang.value.length
|
94
|
+
language = Locale::Info.get_language(lang.value[i,3])
|
95
|
+
languages << language if language
|
96
|
+
i += 3
|
97
|
+
end
|
93
98
|
end
|
94
99
|
end
|
95
|
-
languages
|
100
|
+
languages.uniq
|
96
101
|
end
|
97
102
|
end
|
98
103
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enhanced_marc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ross Singer
|