lab42_basic_constraints 0.1.1 → 0.1.2
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 +24 -0
- data/lib/lab42/basic_constraints/constraint.rb +1 -0
- data/lib/lab42/basic_constraints/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1670a94a94e7a862d42f660df6b15c38efd8aada76025516353d73c8f146a48
|
4
|
+
data.tar.gz: e7620b5d6b2ae1813d17cff3cce12fa6a935728f24d612d2a36451bc526dfcf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5416abb445fd45109ad28acc167c842d801467119469fcf4d1ffc81de578daab6cdfc5c361e018079bc23bfaa762860289cb09516b267c8621bee1262c398657
|
7
|
+
data.tar.gz: '0148614a24de35f98bc4f997dae7388492f386e1ab980f90e4835ea94ae3c7da00c8741f3063e6028575e430b34deccb9dba89a6debec79feeff87c3bc77b9a0'
|
data/README.md
CHANGED
@@ -115,6 +115,30 @@ Example: Illegal Dates
|
|
115
115
|
expect( message ).to eq("2020-00-01 is not a legal date")
|
116
116
|
```
|
117
117
|
|
118
|
+
## Context Equality More Of A Tricky Sticker
|
119
|
+
|
120
|
+
And Most Surprisingly
|
121
|
+
|
122
|
+
```ruby
|
123
|
+
expect(BC.bool).not_to eq(BC.bool)
|
124
|
+
```
|
125
|
+
|
126
|
+
However in many cases the name and the default say a lot about a constraint's behavior
|
127
|
+
|
128
|
+
Given
|
129
|
+
```ruby
|
130
|
+
let(:natural) {BC.non_negative_int}
|
131
|
+
let(:def42) {BC.non_negative_int.set_default(42)}
|
132
|
+
```
|
133
|
+
|
134
|
+
Then we can compare as follows
|
135
|
+
```ruby
|
136
|
+
expect( natural.name ).to eq(BC.non_negative_int.name)
|
137
|
+
expect( natural.default ).to eq(0)
|
138
|
+
expect( def42.name ).to eq(BC.non_negative_int.name)
|
139
|
+
expect( def42.default ).to eq(42)
|
140
|
+
```
|
141
|
+
|
118
142
|
# LICENSE
|
119
143
|
|
120
144
|
Copyright 2020 Robert Dober robert.dober@gmail.com
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lab42_basic_constraints
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Dober
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lab42_result
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: '0'
|
114
114
|
requirements: []
|
115
|
-
rubygems_version: 3.1.
|
115
|
+
rubygems_version: 3.1.4
|
116
116
|
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: Basic, useful and recurring constraints
|