lab42_data_class 0.5.0 → 0.5.1
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 +4 -4
- data/README.md +1 -1
- data/lib/lab42/data_class/proxy/constraints.rb +1 -1
- data/lib/lab42/data_class/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 70b03224373a4bdfe219cfb5d71d735f4a5b4d02c57531ea0f80a1729e542ce5
|
|
4
|
+
data.tar.gz: b04020b335831a2c8fb8070bb17056874bb9103c5dda7b0e313da93c8afd80a0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c360a0eb554b9356c92e0a395d09a2dd29dc76f64d2a805ef6ac8e1699a057bb01fc8a41be4bf2f34f3e3ec5d9eff336817541bc59d39f7d94c74131303e2f0d
|
|
7
|
+
data.tar.gz: 63395d4ede760ce63e7d92753ef370b2da666bafec309dee43f8c8549e768cc653d1976742441b583fd09a1a85535cc783834998ce494b903f2a40d380073a46
|
data/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
An Immutable DataClass for Ruby
|
|
13
13
|
|
|
14
14
|
Exposes a class factory function `Kernel::DataClass` and a class
|
|
15
|
-
modifer `Module#dataclass
|
|
15
|
+
modifer `Module#dataclass`, also creates two _tuple_ classes, `Pair` and
|
|
16
16
|
`Triple`
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
@@ -34,7 +34,7 @@ module Lab42
|
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
def _check_constraint_against_default_value(attr, value, constraint)
|
|
37
|
-
unless constraint.(value)
|
|
37
|
+
unless Maker.make_constraint(constraint).(value)
|
|
38
38
|
"default value #{value.inspect} is not allowed for attribute #{attr.inspect}"
|
|
39
39
|
end
|
|
40
40
|
rescue StandardError => e
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lab42_data_class
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Robert Dober
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-02-
|
|
11
|
+
date: 2022-02-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |
|
|
14
14
|
An Immutable DataClass for Ruby
|
|
@@ -39,7 +39,7 @@ homepage: https://github.com/robertdober/lab42_data_class
|
|
|
39
39
|
licenses:
|
|
40
40
|
- Apache-2.0
|
|
41
41
|
metadata: {}
|
|
42
|
-
post_install_message:
|
|
42
|
+
post_install_message:
|
|
43
43
|
rdoc_options: []
|
|
44
44
|
require_paths:
|
|
45
45
|
- lib
|
|
@@ -55,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
55
55
|
version: '0'
|
|
56
56
|
requirements: []
|
|
57
57
|
rubygems_version: 3.3.3
|
|
58
|
-
signing_key:
|
|
58
|
+
signing_key:
|
|
59
59
|
specification_version: 4
|
|
60
60
|
summary: Finally a dataclass in ruby
|
|
61
61
|
test_files: []
|