rails-on-sorbet 0.2.6 → 0.2.7
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/CHANGELOG.md +7 -0
- data/lib/rails/on/sorbet/version.rb +1 -1
- data/rbi/hash.rbi +71 -0
- data/rbi/map.rbi +5 -5
- data/rbi/set.rbi +25 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c4cb80ad204ac1ff75b170054b6c3722eaab381d2c707eaa04e9ae937bc7e39
|
4
|
+
data.tar.gz: 2796d4d8a2ac13e1d30618aa60016208201349df01f4ebcdf8d4af3fd84fe020
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c30c27cc7e051c159e5f8af119cc48862410974a4808af8dac082d3a9be5aa56802bf5aa9c12d13ba43d274a554f33dd88fc65c60a181ab46089a95d07206d59
|
7
|
+
data.tar.gz: fd0d8cdd737a867e9fe269a76823626b1040f643710e7aa56090b39411eaed24310d9d11bcc7593de9c8c03d4c5ca3aa5d430302c5fea0cea3f6ce505449f515
|
data/CHANGELOG.md
CHANGED
@@ -12,6 +12,13 @@ Add changes in new features here. Do not change the gem's version in pull/merge
|
|
12
12
|
### Changes
|
13
13
|
-
|
14
14
|
|
15
|
+
## [0.2.7] - 08.10.2025
|
16
|
+
|
17
|
+
[Diff](https://github.com/espago/rails-on-sorbet/compare/v0.2.6...v0.2.7)
|
18
|
+
|
19
|
+
### Changes
|
20
|
+
- Improve signatures of `Map#include?`, `Map#key?`, `Map#[]`, `Map#value?`,`Hash#include?`, `Hash#key?`, `Hash#[]`, `Hash#value?`, `Set#include?`
|
21
|
+
|
15
22
|
## [0.2.6] - 02.10.2025
|
16
23
|
|
17
24
|
[Diff](https://github.com/espago/rails-on-sorbet/compare/v0.2.5...v0.2.6)
|
data/rbi/hash.rbi
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
# typed: false
|
2
|
+
|
3
|
+
class Hash
|
4
|
+
sig { params(object: T.anything).returns(T::Boolean) }
|
5
|
+
def exclude?(object); end
|
6
|
+
|
7
|
+
# Returns `true` if the given key is present in *hsh*.
|
8
|
+
#
|
9
|
+
# ```ruby
|
10
|
+
# h = { "a" => 100, "b" => 200 }
|
11
|
+
# h.has_key?("a") #=> true
|
12
|
+
# h.has_key?("z") #=> false
|
13
|
+
# ```
|
14
|
+
#
|
15
|
+
# Note that
|
16
|
+
# [`include?`](https://docs.ruby-lang.org/en/2.7.0/Hash.html#method-i-include-3F)
|
17
|
+
# and
|
18
|
+
# [`member?`](https://docs.ruby-lang.org/en/2.7.0/Hash.html#method-i-member-3F)
|
19
|
+
# do not test member equality using `==` as do other Enumerables.
|
20
|
+
#
|
21
|
+
# See also
|
22
|
+
# [`Enumerable#include?`](https://docs.ruby-lang.org/en/2.7.0/Enumerable.html#method-i-include-3F)
|
23
|
+
sig do
|
24
|
+
params(
|
25
|
+
arg0: T.anything,
|
26
|
+
)
|
27
|
+
.returns(T::Boolean)
|
28
|
+
end
|
29
|
+
def include?(arg0); end
|
30
|
+
|
31
|
+
sig do
|
32
|
+
params(
|
33
|
+
arg0: T.anything,
|
34
|
+
)
|
35
|
+
.returns(T::Boolean)
|
36
|
+
end
|
37
|
+
def key?(arg0); end
|
38
|
+
|
39
|
+
# Element Reference---Retrieves the *value* object corresponding to the *key*
|
40
|
+
# object. If not found, returns the default value (see
|
41
|
+
# [`Hash::new`](https://docs.ruby-lang.org/en/2.7.0/Hash.html#method-c-new)
|
42
|
+
# for details).
|
43
|
+
#
|
44
|
+
# ```ruby
|
45
|
+
# h = { "a" => 100, "b" => 200 }
|
46
|
+
# h["a"] #=> 100
|
47
|
+
# h["c"] #=> nil
|
48
|
+
# ```
|
49
|
+
sig do
|
50
|
+
params(
|
51
|
+
arg0: T.anything,
|
52
|
+
)
|
53
|
+
.returns(T.nilable(V))
|
54
|
+
end
|
55
|
+
def [](arg0); end
|
56
|
+
|
57
|
+
# Returns `true` if the given value is present for some key in *hsh*.
|
58
|
+
#
|
59
|
+
# ```ruby
|
60
|
+
# h = { "a" => 100, "b" => 200 }
|
61
|
+
# h.value?(100) #=> true
|
62
|
+
# h.value?(999) #=> false
|
63
|
+
# ```
|
64
|
+
sig do
|
65
|
+
params(
|
66
|
+
arg0: T.anything,
|
67
|
+
)
|
68
|
+
.returns(T::Boolean)
|
69
|
+
end
|
70
|
+
def value?(arg0); end
|
71
|
+
end
|
data/rbi/map.rbi
CHANGED
@@ -28,7 +28,7 @@ module Map
|
|
28
28
|
sig {abstract.returns(T::Boolean)}
|
29
29
|
def empty?(); end
|
30
30
|
|
31
|
-
sig { abstract.params(object:
|
31
|
+
sig { abstract.params(object: T.anything).returns(T::Boolean) }
|
32
32
|
def exclude?(object); end
|
33
33
|
|
34
34
|
# Returns `true` if the given key is present in *hsh*.
|
@@ -49,7 +49,7 @@ module Map
|
|
49
49
|
# [`Enumerable#include?`](https://docs.ruby-lang.org/en/2.7.0/Enumerable.html#method-i-include-3F)
|
50
50
|
sig do
|
51
51
|
abstract.params(
|
52
|
-
arg0:
|
52
|
+
arg0: T.anything,
|
53
53
|
)
|
54
54
|
.returns(T::Boolean)
|
55
55
|
end
|
@@ -113,7 +113,7 @@ module Map
|
|
113
113
|
|
114
114
|
sig do
|
115
115
|
abstract.params(
|
116
|
-
arg0:
|
116
|
+
arg0: T.anything,
|
117
117
|
)
|
118
118
|
.returns(T::Boolean)
|
119
119
|
end
|
@@ -290,7 +290,7 @@ module Map
|
|
290
290
|
# ```
|
291
291
|
sig do
|
292
292
|
abstract.params(
|
293
|
-
arg0:
|
293
|
+
arg0: T.anything,
|
294
294
|
)
|
295
295
|
.returns(T.nilable(V))
|
296
296
|
end
|
@@ -753,7 +753,7 @@ module Map
|
|
753
753
|
# ```
|
754
754
|
sig do
|
755
755
|
abstract.params(
|
756
|
-
arg0:
|
756
|
+
arg0: T.anything,
|
757
757
|
)
|
758
758
|
.returns(T::Boolean)
|
759
759
|
end
|
data/rbi/set.rbi
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
class Set
|
4
|
+
# sig { params(object: T.anything).returns(T::Boolean) }
|
5
|
+
# def exclude?(object); end
|
6
|
+
|
7
|
+
# Returns true if the set contains the given object.
|
8
|
+
# Note that `include?` and `member?` do not test
|
9
|
+
# member
|
10
|
+
# equality
|
11
|
+
# using `==` as do other Enumerables.
|
12
|
+
# See also
|
13
|
+
# [`Enumerable#include?`](https://docs.ruby-lang.org/en/2.7.0/Enumerable.html#method-i-include-3F)
|
14
|
+
#
|
15
|
+
# Also aliased as:
|
16
|
+
# [`member?`](https://docs.ruby-lang.org/en/2.7.0/Set.html#method-i-member-3F),
|
17
|
+
# [`===`](https://docs.ruby-lang.org/en/2.7.0/Set.html#method-i-3D-3D-3D)
|
18
|
+
sig do
|
19
|
+
params(
|
20
|
+
o: T.anything,
|
21
|
+
)
|
22
|
+
.returns(T::Boolean)
|
23
|
+
end
|
24
|
+
def include?(o); end
|
25
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-on-sorbet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mateusz Drewniak
|
@@ -77,8 +77,10 @@ files:
|
|
77
77
|
- rbi/current_attributes.rbi
|
78
78
|
- rbi/datetime.rbi
|
79
79
|
- rbi/duration.rbi
|
80
|
+
- rbi/hash.rbi
|
80
81
|
- rbi/map.rbi
|
81
82
|
- rbi/numeric.rbi
|
83
|
+
- rbi/set.rbi
|
82
84
|
homepage: https://github.com/espago/rails-on_sorbet
|
83
85
|
licenses: []
|
84
86
|
metadata:
|