sorbet-runtime 0.5.6281 → 0.5.6292

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/types/helpers.rb +17 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63bab72b83acd7259f3cccecbde20697b8f3d9624b7b6f2375794d23160c1be3
4
- data.tar.gz: 9d07bd57a49cf42ce854cec74195f388a715507ac775fcd51f014a903a095714
3
+ metadata.gz: 787bd10cc86ab4cffccd03635d86a365ac215827d4daec550b79b6ed1170c06b
4
+ data.tar.gz: 473e1fdb8d2988ed8677f921f460df004152336aceb8a7a7a19540cd1888d83b
5
5
  SHA512:
6
- metadata.gz: b5ea92da25e0cc43609c81c913cca8f9be94552b8a57f3fef35391271c8557c757e934ac20bf22ae02c57463bbf6e5db0f3bd156cc1ec72183731ed8a9bc23b5
7
- data.tar.gz: 9e06a6cc349624f8f0353c3a3ee607a32e7d49b48ff73aaa4378724944eeb7209b0e9420f7371b8b4e674e58fe4ce386217ebc4bfd8b3e11117c8c53314d6a34
6
+ metadata.gz: 66e55bcb04a0ab0640788d3993d9c4d2ebb82496bd2b33d33bd9ce73c421b05538cb4b46accfc8cc7929d4d88d855cefc8cbed057cb2d0850968e8fe99384f6c
7
+ data.tar.gz: 7d0f9655880af81a7e3cc0b987ba67eecf591b55f03c4c269e2fdf066973dbd01ff30fe9e80ca1c29949e43544ec3d947cd7dc6f9a0e8130d6e9599eec3811b0
data/lib/types/helpers.rb CHANGED
@@ -36,4 +36,21 @@ module T::Helpers
36
36
  def mixes_in_class_methods(mod, *mods)
37
37
  Private::Mixins.declare_mixes_in_class_methods(self, [mod].concat(mods))
38
38
  end
39
+
40
+ # Specify an inclusion or inheritance requirement for `self`.
41
+ #
42
+ # Example:
43
+ #
44
+ # module MyHelper
45
+ # extend T::Helpers
46
+ #
47
+ # requires_ancestor Kernel
48
+ # end
49
+ #
50
+ # class MyClass < BasicObject # error: `MyClass` must include `Kernel` (required by `MyHelper`)
51
+ # include MyHelper
52
+ # end
53
+ #
54
+ # TODO: implement the checks in sorbet-runtime.
55
+ def requires_ancestor(mod, *mods); end
39
56
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorbet-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6281
4
+ version: 0.5.6292
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-09 00:00:00.000000000 Z
11
+ date: 2021-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest