relaton-itu 1.7.4 → 1.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd478e1103e026b9ff40937a19dccc0166da6f839fc2fb216a59ac306b4958f1
4
- data.tar.gz: 12bc7a7304aadb7ea91df2bc618b49ef1333ea58d577c760e9273c955fd5fd01
3
+ metadata.gz: 2764e22b822215ec681d22f20b979cc80cb498ffa49d87a164a6118575dd686f
4
+ data.tar.gz: 9863ca9b6b6d9f76bb3265ef148115de055dd82445c5c058564345e963ada182
5
5
  SHA512:
6
- metadata.gz: a4ee1c7e0c5ff26729f598b744035e8ebbf285703f04da910a978d38f3e3a9dc44f9e76d4bc17e6257e443b953c5dd218526305bd95106af410ddbcc667db83f
7
- data.tar.gz: b10b5dc734cfed86b6653e8d0f56257ac52a4e06718c30a9256897eecd11a03642ded7820cf7d9797d2c3c7731ccc093035b6e7a7ab4477b6787f120449ca494
6
+ metadata.gz: '087567111db88be5ee21f16942ce4b80fc07537665b565fb4b0913edcd3e6427196e541775dfaf142ddf9c0b1693d8e0067d7bbbf9602a87293890d6074089ac'
7
+ data.tar.gz: f9ca1d2439bcef8bc110a8cfe10cb22ea47e2000b289f3c446459c9e51d036bbf2bb7b1f8c99b798735b02522f7e4985aa78f1cefe36ff868f301795858abdaa
data/README.adoc CHANGED
@@ -127,11 +127,7 @@ hash = YAML.load_file 'spec/examples/itu_bib_item.yml'
127
127
  => {"id"=>"ITU-T L.163 (11/2018)",
128
128
  ...
129
129
 
130
- bib_hash = RelatonItu::HashConverter.hash_to_bib hash
131
- => {:id=>"ITU-T L.163 (11/2018)",
132
- ...
133
-
134
- RelatonItu::ItuBibliographicItem.new bib_hash
130
+ RelatonItu::ItuBibliographicItem.from_hash hash
135
131
  => #<RelatonItu::ItuBibliographicItem:0x007fd88ac02aa0
136
132
  ...
137
133
  ----
@@ -14,5 +14,12 @@ module RelatonItu
14
14
  end
15
15
  super
16
16
  end
17
+
18
+ # @param hash [Hash]
19
+ # @return [RelatonItu::ItuBibliographicItem]
20
+ def self.from_hash(hash)
21
+ item_hash = ::RelatonItu::HashConverter.hash_to_bib(hash)
22
+ new **item_hash
23
+ end
17
24
  end
18
25
  end
@@ -26,8 +26,7 @@ module RelatonItu
26
26
  # @param hash [Hash]
27
27
  # @return [RelatonItu::ItuBibliographicItem]
28
28
  def hash_to_bib(hash)
29
- item_hash = ::RelatonItu::HashConverter.hash_to_bib(hash)
30
- ::RelatonItu::ItuBibliographicItem.new item_hash
29
+ ::RelatonItu::ItuBibliographicItem.from_hash hash
31
30
  end
32
31
 
33
32
  # Returns hash of XML grammar
@@ -1,3 +1,3 @@
1
1
  module RelatonItu
2
- VERSION = "1.7.4".freeze
2
+ VERSION = "1.7.5".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-itu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.4
4
+ version: 1.7.5
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
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
192
  - !ruby/object:Gem::Version
193
193
  version: '0'
194
194
  requirements: []
195
- rubygems_version: 3.0.6
195
+ rubygems_version: 3.2.3
196
196
  signing_key:
197
197
  specification_version: 4
198
198
  summary: 'RelatonItu: retrieve ITU Standards for bibliographic use using the BibliographicItem