relaton-ieee 1.7.2 → 1.7.3

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: 98b38e0f4af1983e69ec644498158c2304af693f2064dd6759172729b8ab8d5d
4
- data.tar.gz: c9beec4c7e7388a231d5c9f24726a93c1efddece2279ade258af61a469f858fc
3
+ metadata.gz: c71b1afdda50aaebc26383824489fd07ed9e0894103822ea10b2e94efe958e0b
4
+ data.tar.gz: 38e409de1ae94996527825c92f518bd50945ba306fbf3b9ad98dcaf7eea8d0d0
5
5
  SHA512:
6
- metadata.gz: 229bada39301138ab148cd10073f4ffd7b6722d23d293b37abcb34467cb6bca8248ea221bba560cd2f0f031364270bd367727cbce3f6259e3185970b13c9c99c
7
- data.tar.gz: 45bcf3797474d09d210f5b2d7f3c915b30453f7b0fdc9b63507b61eaf3ea1b4badc671cdc57579ceb85d99851960775eca06b1ed00dcf232d29dea87ac810db0
6
+ metadata.gz: 31d10b674df67f259230fe535746c82e88c30521a53b16db5e6240a68fbc788737f94837d141e58e0f579cba934d048d992dbb72b4b9317e85d529b06dc8aa2e
7
+ data.tar.gz: 0fc38f39a5854357ef65e0def1944a0fb4321d6e00d8a04b22b99e888de6f274224c816cc074b66a8100b965ad646dd6f638531d28245132f84b3b8b8bfa2901
data/README.adoc CHANGED
@@ -153,11 +153,7 @@ hash = YAML.load_file 'spec/fixtures/ieee_528_2019.yaml'
153
153
  => {"id"=>"528-2019", "title"=>{
154
154
  ...
155
155
 
156
- bib_hash = RelatonIeee::HashConverter.hash_to_bib hash
157
- => {:id=>"528-2019", :title=>[{
158
- ...
159
-
160
- RelatonIeee::IeeeBibliographicItem.new bib_hash
156
+ RelatonIeee::IeeeBibliographicItem.from_hash hash
161
157
  => #<RelatonIeee::IeeeBibliographicItem:0x007fce940b3eb0
162
158
  ...
163
159
  ----
@@ -9,6 +9,13 @@ module RelatonIeee
9
9
  super
10
10
  end
11
11
 
12
+ # @param hash [Hash]
13
+ # @return [RelatonIeee::IeeeBibliographicItem]
14
+ def self.from_hash(hash)
15
+ item_hash = ::RelatonIeee::HashConverter.hash_to_bib(hash)
16
+ new **item_hash
17
+ end
18
+
12
19
  # @param opts [Hash]
13
20
  # @option opts [Nokogiri::XML::Builder] :builder XML builder
14
21
  # @option opts [Boolean] :bibdata
@@ -28,8 +28,7 @@ module RelatonIeee
28
28
  # @param hash [Hash]
29
29
  # @return [RelatonIeee::IeeeBibliographicItem]
30
30
  def hash_to_bib(hash)
31
- item_hash = ::RelatonIeee::HashConverter.hash_to_bib(hash)
32
- ::RelatonIeee::IeeeBibliographicItem.new item_hash
31
+ ::RelatonIeee::IeeeBibliographicItem.new hash
33
32
  end
34
33
 
35
34
  # Returns hash of XML grammar
@@ -1,3 +1,3 @@
1
1
  module RelatonIeee
2
- VERSION = "1.7.2".freeze
2
+ VERSION = "1.7.3".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-ieee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.2
4
+ version: 1.7.3
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-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  - !ruby/object:Gem::Version
179
179
  version: '0'
180
180
  requirements: []
181
- rubygems_version: 3.2.3
181
+ rubygems_version: 3.0.6
182
182
  signing_key:
183
183
  specification_version: 4
184
184
  summary: 'RelatonIeee: retrieve IEEE Standards for bibliographic use using the IeeeBibliographicItem