sorbet-runtime 0.5.6287 → 0.5.6295

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: 6a5a97f9ecd136a9941336c8871bc026409d0f3a30a66fd5dffe302fe33ed771
4
- data.tar.gz: c89dff5bf909656c90b0e2073efcd539116f4fafe301a18a7b2e0ebb9baa2af8
3
+ metadata.gz: 1499d7c137f6d9b53c61885843cc7631c7e8984fdcb5c83e3e9c06316706a7bd
4
+ data.tar.gz: 63f24495ef2ef2b14e9afa6b30db65109631684c91b5cf400f0896027c7cd91f
5
5
  SHA512:
6
- metadata.gz: 508ec9ac79c59a78eb37c15607a38c942dc3c0aa626911c0f53d4f410be3775a140c8abc1ff5fb1a548e35d01517243b5037e55a4d1483104ca08013c963c52e
7
- data.tar.gz: b9c04799ab15c06ec2b8026ff90969d4f9c229a50cccac7f86f63221704c965b562c3efcdecac36480cfd008c0c422e522a2d53652b848d655c58e59b893fb4b
6
+ metadata.gz: f1642f8bfb9f6c69a9496837e270d916e1a187044d721484235ed1a0e292a4ed8199b520f766f77e7e6c9a1ab3006bf6f4a6c2158511524fdb3cfaf91b96c093
7
+ data.tar.gz: 16157845afa712815f96724daff65a38b3e73f16a46110c76571ff4c75410b1e0d464f246478e7ae5c5a77532ddddb0dccf6d1ccbbe6865bfdc7989e3832e7ca
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.6287
4
+ version: 0.5.6295
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-12 00:00:00.000000000 Z
11
+ date: 2021-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest