relaton-nist 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d852851cf220ab63699584b62e0d5a051ad39eb9b7ef287840cbd782ce67bed9
4
- data.tar.gz: 25208ad1822a38f658cb9d1a857451f614598b2dddcc969a84c31fd3c204ac1d
3
+ metadata.gz: e37bb40effbc27c40ce57904429d2f12d7aac6dfa50bc5acfab0e5f98bebf526
4
+ data.tar.gz: '095ce08a137c804dc88df5d465fbf2a43180dc8b195c8db50ebe5168ce23d025'
5
5
  SHA512:
6
- metadata.gz: 8e60c1f19d96a5d289a780ea29cec5830db57ca84c3007d5f0380b0fca6338538d75456bf963fb2f64208105a18b3b08073f642c66b2323fe481fd2d15f578c1
7
- data.tar.gz: c19983c79a538c1bd0357ffbefc2b3e4450115f505f01b38fbf44e5028e67d8a544e339d2f4e88b5532c4d8ec6e22caa6e12e3b7e592ecf4849f7c34064a5cb3
6
+ metadata.gz: f69913864ef1c4331a952430cefb2bf8eeebab49e60bb75bbd2a3fc1d44df33bb12ed4096c73e2a39eece18708067adc1ac3b0a6ec44db68bce6966d8e1301f9
7
+ data.tar.gz: a5a254e8bc1d9ba8c78a1174b3e89641a937235cce439a2a488be86604229bf38022c8b809629f10437e38b88a7039bd83f2072c2cbf8dd9120aa3800ea98ce1
@@ -1,3 +1,3 @@
1
1
  module RelatonNist
2
- VERSION = "1.2.1".freeze
2
+ VERSION = "1.2.2".freeze
3
3
  end
@@ -43,6 +43,20 @@ module RelatonNist
43
43
  extended: cp.at("extended")&.text
44
44
  )
45
45
  end
46
+
47
+ # @param item [Nokogiri::XML::Element]
48
+ # @return [Array<RelatonBib::DocumentRelation>]
49
+ def fetch_relations(item)
50
+ item.xpath("./relation").map do |rel|
51
+ DocumentRelation.new(
52
+ type: rel[:type]&.empty? ? nil : rel[:type],
53
+ description: relation_description(rel),
54
+ bibitem: bib_item(item_data(rel.at("./bibitem"))),
55
+ locality: localities(rel),
56
+ source_locality: source_localities(rel),
57
+ )
58
+ end
59
+ end
46
60
  end
47
61
  end
48
62
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-nist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-28 00:00:00.000000000 Z
11
+ date: 2020-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase