eac_ruby_utils 0.90.0 → 0.91.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67479e6645bae216dae24b09ff55f7cb5b12d803113963a3990c4c9215b47827
|
4
|
+
data.tar.gz: d9e542d4e1ba6d39623ce2981da1d3a618946ae483a3822829e3bac92a2fb9cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98b6e459e408b63bdf208d9376829e40dac7bac0e062f872b9313440ccec5e0ac35ba11ff339227578c540a6a8463e8ab531d17f77a3ef4bdcd7874352f1a892
|
7
|
+
data.tar.gz: 7da0fb8b6fba05183cdb977ab15fd0e8c93c7d3b3b491e0bcb67e66fdd904def1cabf796de0a64a65526f0a0e427bc21455a9d486ada5e711325f43fe45d6a21
|
@@ -11,4 +11,15 @@ class Object
|
|
11
11
|
"Argument \"#{argument_name}\" is not a #{klass}" \
|
12
12
|
"(Actual class: #{self.class}, actual value: #{self})"
|
13
13
|
end
|
14
|
+
|
15
|
+
# Raises a ArgumentError if +self.count+ is not equal to +count+.
|
16
|
+
#
|
17
|
+
# @return +self+
|
18
|
+
def assert_count(count, argument_name = 'unknown_argument_name')
|
19
|
+
return self if self.count == count
|
20
|
+
|
21
|
+
raise ::ArgumentError,
|
22
|
+
"Argument \"#{argument_name}\" has wrong elements count" \
|
23
|
+
"(Actual: #{self.count}, Required: #{count})"
|
24
|
+
end
|
14
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_ruby_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.91.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|