relaton-bipm 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4c652a640cdcb04816ae94cdd687b3f083cce7d93f8f9991b5175e4df8f12ef
4
- data.tar.gz: 77eeadcdb4ac0a15b5ded03d25ee8c9c0fff368750bbedf228d97f2679db3a39
3
+ metadata.gz: b57a1e45de376e9497cb732c3f00390e49cd7934f8f32c2450ecbc42dc42a1ad
4
+ data.tar.gz: 264e481081ffd5931d09481eb5df72b6cdce4b911a26b664ce805ee2e0b645ce
5
5
  SHA512:
6
- metadata.gz: e3f6946a1f5896f90bb56dcbf79566a96c54ed1c5dce313995d6ab7de4de9875c7ff6458f8a7b53c810273d59fb4684ab8e1e789a974cbebe59704793ee8b6aa
7
- data.tar.gz: e93576e6162aed338841e7c6ddbef08283616168e595218371dd2d842cfd154b73c0eb13d6f7d670676f956271c9beaf5f1def8ffdaa947fd5e86fbf78cf96df
6
+ metadata.gz: 0f293114f4ca38d8d56d47131dcda1b3d1c7511991d88c264ee6d03d7c732792d21d830ee83d975c2e14177d4e3435a0c9941694d80318f3c22c5c0e6c35a0f5
7
+ data.tar.gz: 1bc21653e75e394e58be36469af50a4e9cbac2607dc4a4e3d9441159da93f2646fbbb560c07e26091701706b2264cdaf85d55b2c8fe9f28b363297dcb82e7199
data/README.adoc CHANGED
@@ -128,11 +128,7 @@ hash = YAML.load_file 'spec/fixtures/bipm_item.yml'
128
128
  => {"id"=>"Draft-Agenda-NMI-Dir-Meeting-2017-v10",
129
129
  ...
130
130
 
131
- bib_hash = RelatonBipm::HashConverter.hash_to_bib hash
132
- => {:id=>"Draft-Agenda-NMI-Dir-Meeting-2017-v10",
133
- ...
134
-
135
- RelatonBipm::BipmBibliographicItem.new bib_hash
131
+ RelatonBipm::BipmBibliographicItem.from_hash hash
136
132
  => #<RelatonBipm::BipmBibliographicItem:0x007ffb668755a0
137
133
  ...
138
134
  ----
@@ -42,6 +42,13 @@ module RelatonBipm
42
42
  super
43
43
  end
44
44
 
45
+ # @param hash [Hash]
46
+ # @return [RelatonBipm::BipmBibliographicItem]
47
+ def self.from_hash(hash)
48
+ item_hash = ::RelatonBipm::HashConverter.hash_to_bib(hash)
49
+ new **item_hash
50
+ end
51
+
45
52
  # @param opts [Hash]
46
53
  # @option opts [Nokogiri::XML::Builder] :builder XML builder
47
54
  # @option opts [Boolean] :bibdata
@@ -28,8 +28,7 @@ module RelatonBipm
28
28
  # @param hash [Hash]
29
29
  # @return [RelatonBipm::BipmBibliographicItem]
30
30
  def hash_to_bib(hash)
31
- item_hash = ::RelatonBipm::HashConverter.hash_to_bib(hash)
32
- ::RelatonBipm::BipmBibliographicItem.new item_hash
31
+ ::RelatonBipm::BipmBibliographicItem.from_hash hash
33
32
  end
34
33
 
35
34
  # Returns hash of XML grammar
@@ -1,3 +1,3 @@
1
1
  module RelatonBipm
2
- VERSION = "1.7.1".freeze
2
+ VERSION = "1.7.2".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-bipm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
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-18 00:00:00.000000000 Z
11
+ date: 2021-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -225,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  - !ruby/object:Gem::Version
226
226
  version: '0'
227
227
  requirements: []
228
- rubygems_version: 3.0.6
228
+ rubygems_version: 3.2.3
229
229
  signing_key:
230
230
  specification_version: 4
231
231
  summary: 'RelatonBipm: retrieve BIPM Standards for bibliographic use using the BibliographicItem