pubid-core 1.1.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pubid/core/identifier.rb +22 -4
- data/lib/pubid/core/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: 1e9bf3dd3d9bc2b650200a864109ae197ab92914d1badcbf211d414b9b72d535
|
4
|
+
data.tar.gz: 65ceef880cc4e59dfa4cd059cd2b57090cfee8400cf26717f6bd480d3a29b7db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57670502ba1de60b88d0befb0933f990c37b3dd23544a5bd4889d2da0aea6086ea1d87032e9c547c2c5a9430037c3325d77149ebe36edf3a66c349ec3d734274
|
7
|
+
data.tar.gz: 1c9917b90d532faf17a601fea62ea18fe204098052b349b189067287877f29ba66dd2e244389b4b906d8772d33eced7aa2f204f61082a81aede616168e11b038
|
@@ -14,16 +14,34 @@ module Pubid::Core
|
|
14
14
|
# @param edition [Integer] document's edition, eg. "1"
|
15
15
|
# @param language [String] document's translation language
|
16
16
|
# (available languages: "ru", "fr", "en", "ar")
|
17
|
-
# @param amendments [Array<Amendment>] document's amendments
|
18
|
-
# @param corrigendums [Array<Corrigendum>] document's corrigendums
|
17
|
+
# @param amendments [Array<Amendment>,Array<Hash>] document's amendments
|
18
|
+
# @param corrigendums [Array<Corrigendum>,Array<Hash>] document's corrigendums
|
19
19
|
# @see Amendment
|
20
20
|
# @see Corrigendum
|
21
21
|
def initialize(publisher:, number:, copublisher: nil, part: nil, type: nil,
|
22
22
|
year: nil, edition: nil, language: nil, amendments: nil,
|
23
23
|
corrigendums: nil)
|
24
24
|
|
25
|
-
|
26
|
-
|
25
|
+
if amendments
|
26
|
+
@amendments = amendments.map do |amendment|
|
27
|
+
if amendment.is_a?(Hash)
|
28
|
+
self.class.get_transformer_class.new.apply(:amendments => [amendment])[:amendments].first
|
29
|
+
else
|
30
|
+
amendment
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
if corrigendums
|
36
|
+
@corrigendums = corrigendums.map do |corrigendum|
|
37
|
+
if corrigendum.is_a?(Hash)
|
38
|
+
self.class.get_transformer_class.new.apply(:corrigendums => [corrigendum])[:corrigendums].first
|
39
|
+
else
|
40
|
+
corrigendum
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
27
45
|
@publisher = publisher.to_s
|
28
46
|
@number = number
|
29
47
|
@copublisher = copublisher if copublisher
|
data/lib/pubid/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pubid-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|