rangops 1.0.0.rc1 → 1.0.0
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/Gemfile.lock +1 -1
- data/README.md +15 -2
- data/docs/README_md.html +15 -2
- data/docs/created.rid +2 -2
- data/docs/index.html +15 -2
- data/docs/js/search_index.js.gz +0 -0
- data/lib/rangops/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: 5710c3163c9b9098afe8d67062eff72e52018d102c4d2eeb322038a73692b52c
|
|
4
|
+
data.tar.gz: 3a832f5d480caf10ec7dc687363d602134b3749d51531f9bc8b1967b32c2b18f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d9afee6c9742f6903f5cea072e9061aa3eb5f16600a500fdd48b9c68642fe4c21d376acf64b021b19bea0a1e5e402f36cff23aae690181d295bde7774b0f1931
|
|
7
|
+
data.tar.gz: 0f06c047dd654d539c2aa93869dab696e8e32184cba8f4b30a37671d33b09159c62b11b0354b948e49b11b3ba6525afa78736e40cd82e2b2c42073503e1a29b0
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -37,8 +37,16 @@ Relative complement:
|
|
|
37
37
|
(1..10).complement(5..15)
|
|
38
38
|
=> 10..15
|
|
39
39
|
|
|
40
|
+
Checking for subsets/supersets:
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
(2..3).subset?(0..10)
|
|
43
|
+
=> true
|
|
44
|
+
|
|
45
|
+
(0..10).superset?(2..3)
|
|
46
|
+
=> true
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
Check [API docs](https://bartpiet.github.io/rangops/Rangops/Set.html) for full list of aliases
|
|
42
50
|
and predicates.
|
|
43
51
|
|
|
44
52
|
There is no mapping to arrays nor iteratons under the hood,
|
|
@@ -57,6 +65,11 @@ Beginless and endless ranges are supported.
|
|
|
57
65
|
(nil..10).union(5..nil)
|
|
58
66
|
=> nil..nil
|
|
59
67
|
|
|
68
|
+
End exclusion is supported too.
|
|
69
|
+
|
|
70
|
+
(1...3).intersect?(3..10)
|
|
71
|
+
=> false
|
|
72
|
+
|
|
60
73
|
It works well on string and date ranges too.
|
|
61
74
|
|
|
62
75
|
('2025-01-01'..'2026-12-31') & ('2026-01-01'..'2027-12-31')
|
|
@@ -68,7 +81,7 @@ It works well on string and date ranges too.
|
|
|
68
81
|
|
|
69
82
|
Operations are supposed to return a `Range` result, so they only work on
|
|
70
83
|
arguments delimited with values of the same type.
|
|
71
|
-
`(1..5) & ('c'..'g')` will just return `nil
|
|
84
|
+
`(1..5) & ('c'..'g')` will just return `nil`.
|
|
72
85
|
|
|
73
86
|
|
|
74
87
|
## License
|
data/docs/README_md.html
CHANGED
|
@@ -141,7 +141,15 @@
|
|
|
141
141
|
<pre>(1..10).complement(5..15)
|
|
142
142
|
=> 10..15</pre>
|
|
143
143
|
|
|
144
|
-
<p>
|
|
144
|
+
<p>Checking for subsets/supersets:</p>
|
|
145
|
+
|
|
146
|
+
<pre>(2..3).subset?(0..10)
|
|
147
|
+
=> true
|
|
148
|
+
|
|
149
|
+
(0..10).superset?(2..3)
|
|
150
|
+
=> true</pre>
|
|
151
|
+
|
|
152
|
+
<p>Check <a href="https://bartpiet.github.io/rangops/Rangops/Set.html">API docs</a> for full list of aliases and predicates.</p>
|
|
145
153
|
|
|
146
154
|
<p>There is no mapping to arrays nor iteratons under the hood, just begin/end values comparison - so operations on ranges of any size are possible, with no penalty on speed or memory usage. Ranges delimited with any type of Numerics can be used.</p>
|
|
147
155
|
|
|
@@ -156,6 +164,11 @@
|
|
|
156
164
|
(nil..10).union(5..nil)
|
|
157
165
|
=> nil..nil</pre>
|
|
158
166
|
|
|
167
|
+
<p>End exclusion is supported too.</p>
|
|
168
|
+
|
|
169
|
+
<pre>(1...3).intersect?(3..10)
|
|
170
|
+
=> false</pre>
|
|
171
|
+
|
|
159
172
|
<p>It works well on string and date ranges too.</p>
|
|
160
173
|
|
|
161
174
|
<pre>('2025-01-01'..'2026-12-31') & ('2026-01-01'..'2027-12-31')
|
|
@@ -164,7 +177,7 @@
|
|
|
164
177
|
('a'..'e') & ('c'..'g')
|
|
165
178
|
=> "c".."e"</pre>
|
|
166
179
|
|
|
167
|
-
<p>Operations are supposed to return a <code>Range</code> result, so they only work on arguments delimited with values of the same type. <code>(1..5) & ('c'..'g')</code> will just return <code>nil</code
|
|
180
|
+
<p>Operations are supposed to return a <code>Range</code> result, so they only work on arguments delimited with values of the same type. <code>(1..5) & ('c'..'g')</code> will just return <code>nil</code>.</p>
|
|
168
181
|
|
|
169
182
|
<h2 id="label-License">License<span><a href="#label-License">¶</a> <a href="#top">↑</a></span></h2>
|
|
170
183
|
|
data/docs/created.rid
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
README.md
|
|
1
|
+
Thu, 14 Aug 2025 19:37:19 +0200
|
|
2
|
+
README.md Thu, 14 Aug 2025 19:34:50 +0200
|
|
3
3
|
lib/rangops/set.rb Wed, 13 Aug 2025 22:04:18 +0200
|
data/docs/index.html
CHANGED
|
@@ -150,7 +150,15 @@
|
|
|
150
150
|
<pre>(1..10).complement(5..15)
|
|
151
151
|
=> 10..15</pre>
|
|
152
152
|
|
|
153
|
-
<p>
|
|
153
|
+
<p>Checking for subsets/supersets:</p>
|
|
154
|
+
|
|
155
|
+
<pre>(2..3).subset?(0..10)
|
|
156
|
+
=> true
|
|
157
|
+
|
|
158
|
+
(0..10).superset?(2..3)
|
|
159
|
+
=> true</pre>
|
|
160
|
+
|
|
161
|
+
<p>Check <a href="https://bartpiet.github.io/rangops/Rangops/Set.html">API docs</a> for full list of aliases and predicates.</p>
|
|
154
162
|
|
|
155
163
|
<p>There is no mapping to arrays nor iteratons under the hood, just begin/end values comparison - so operations on ranges of any size are possible, with no penalty on speed or memory usage. Ranges delimited with any type of Numerics can be used.</p>
|
|
156
164
|
|
|
@@ -165,6 +173,11 @@
|
|
|
165
173
|
(nil..10).union(5..nil)
|
|
166
174
|
=> nil..nil</pre>
|
|
167
175
|
|
|
176
|
+
<p>End exclusion is supported too.</p>
|
|
177
|
+
|
|
178
|
+
<pre>(1...3).intersect?(3..10)
|
|
179
|
+
=> false</pre>
|
|
180
|
+
|
|
168
181
|
<p>It works well on string and date ranges too.</p>
|
|
169
182
|
|
|
170
183
|
<pre>('2025-01-01'..'2026-12-31') & ('2026-01-01'..'2027-12-31')
|
|
@@ -173,7 +186,7 @@
|
|
|
173
186
|
('a'..'e') & ('c'..'g')
|
|
174
187
|
=> "c".."e"</pre>
|
|
175
188
|
|
|
176
|
-
<p>Operations are supposed to return a <code>Range</code> result, so they only work on arguments delimited with values of the same type. <code>(1..5) & ('c'..'g')</code> will just return <code>nil</code
|
|
189
|
+
<p>Operations are supposed to return a <code>Range</code> result, so they only work on arguments delimited with values of the same type. <code>(1..5) & ('c'..'g')</code> will just return <code>nil</code>.</p>
|
|
177
190
|
|
|
178
191
|
<h2 id="label-License">License<span><a href="#label-License">¶</a> <a href="#top">↑</a></span></h2>
|
|
179
192
|
|
data/docs/js/search_index.js.gz
CHANGED
|
Binary file
|
data/lib/rangops/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rangops
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.0
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bartosz Pietraszko
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-08-
|
|
10
|
+
date: 2025-08-14 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: bundler
|