blood_contracts-core 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/blood_contracts/core/sum.rb +5 -1
- data/lib/blood_contracts/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: b5255121f5462c13b32325514c3500cc7d2b69888ce2a463ec1d92ad3b73ada3
|
4
|
+
data.tar.gz: 9b1b380e6597fa8b2e853f0839eb36662a65ce99286146a0b6747ffe733b97db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '029c4b29e22b82d4eb87da995d5cf73ee6747a97ac14e863298ffa650bcac3dcf46e0c7d7b5a9ee0c2d989d5c385c66914a4c4a6a28aebca6e2cce35eac457fb'
|
7
|
+
data.tar.gz: 1899a728a825fae6fd48d17ff68000718513a979676eef4b16f60b05edba654bdfdefa01c735626fb4e60e7adae164318c37b0b22232580d420cc77e94db9c05
|
@@ -20,7 +20,11 @@ module BloodContracts
|
|
20
20
|
def or_a(other_type)
|
21
21
|
sum = Class.new(Sum) { def inspect; super; end }
|
22
22
|
new_sum = self.sum_of.to_a
|
23
|
-
|
23
|
+
if other_type.respond_to?(:sum_of)
|
24
|
+
new_sum += other_type.sum_of.to_a
|
25
|
+
else
|
26
|
+
new_sum << other_type
|
27
|
+
end
|
24
28
|
sum.instance_variable_set(:@sum_of, ::Set.new(new_sum.compact))
|
25
29
|
sum.instance_variable_set(:@finalized, true)
|
26
30
|
sum
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blood_contracts-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Dolganov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin/
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|