relaton-ogc 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +1 -5
- data/lib/relaton_ogc/ogc_bibliographic_item.rb +7 -0
- data/lib/relaton_ogc/processor.rb +1 -2
- data/lib/relaton_ogc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2ac7a32c84f53dd1feca6fd3f78e6a747301ca8a5ea5acc6064aba28d35c4cc
|
4
|
+
data.tar.gz: 53f69c6c7ed7cde4cede3e94b6719e89db9d5d26e5515738b893015c65cf268f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 870708b7b62d068fa1a712e0bd611d0ddcbcf047bc6be75961b643c74379867bcdf491c8b6ade8016dd2fb97f21a288924d8023c7ae5c1f69b0dba2a3688d01f
|
7
|
+
data.tar.gz: '058275c555a698afc60bb826a58bd6ffd0e03aa15785439dc80ae7dbcd7e360dfad9b0b9df6a4e9e3d5da180ce36debd06fba1a906d5fe4bb28390b77f542eaa'
|
data/README.adoc
CHANGED
@@ -108,11 +108,7 @@ hash = YAML.load_file 'spec/fixtures/ogc_bib_item.yml'
|
|
108
108
|
=> {"id"=>"19-025r1",
|
109
109
|
...
|
110
110
|
|
111
|
-
|
112
|
-
=> {:id=>"19-025r1",
|
113
|
-
...
|
114
|
-
|
115
|
-
RelatonOgc::OgcBibliographicItem.new bib_hash
|
111
|
+
RelatonOgc::OgcBibliographicItem.from_hash hash
|
116
112
|
=> #<RelatonOgc::OgcBibliographicItem:0x007fc322ef8548
|
117
113
|
...
|
118
114
|
----
|
@@ -29,6 +29,13 @@ module RelatonOgc
|
|
29
29
|
super
|
30
30
|
end
|
31
31
|
|
32
|
+
# @param hash [Hash]
|
33
|
+
# @return [RelatonOgc::OgcBibliographicItem]
|
34
|
+
def self.from_hash(hash)
|
35
|
+
item_hash = ::RelatonOgc::HashConverter.hash_to_bib(hash)
|
36
|
+
new **item_hash
|
37
|
+
end
|
38
|
+
|
32
39
|
# @return [Hash]
|
33
40
|
def to_hash
|
34
41
|
hash = super
|
@@ -26,8 +26,7 @@ module RelatonOgc
|
|
26
26
|
# @param hash [Hash]
|
27
27
|
# @return [RelatonOgc::OgcBibliographicItem]
|
28
28
|
def hash_to_bib(hash)
|
29
|
-
|
30
|
-
::RelatonOgc::OgcBibliographicItem.new item_hash
|
29
|
+
::RelatonOgc::OgcBibliographicItem.from_hash hash
|
31
30
|
end
|
32
31
|
|
33
32
|
# Returns hash of XML grammar
|
data/lib/relaton_ogc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-ogc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.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: 2021-03-
|
11
|
+
date: 2021-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|