ipt 1.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/test.yml +41 -0
- data/.gitignore +0 -1
- data/Gemfile.lock +318 -0
- data/README.md +1 -1
- data/bin/tapioca +29 -0
- data/ipt.gemspec +15 -8
- data/lib/pt.rb +8 -9
- data/lib/pt/action.rb +42 -24
- data/lib/pt/cli.rb +1 -1
- data/lib/pt/client.rb +2 -3
- data/lib/pt/configuration.rb +1 -1
- data/lib/pt/data_row.rb +1 -0
- data/lib/pt/data_table.rb +1 -2
- data/lib/pt/io.rb +16 -7
- data/lib/pt/version.rb +2 -1
- data/sorbet/config +3 -0
- data/sorbet/rbi/gems/activesupport.rbi +671 -0
- data/sorbet/rbi/gems/activesupport@6.1.3.2.rbi +63 -0
- data/sorbet/rbi/gems/addressable.rbi +147 -0
- data/sorbet/rbi/gems/addressable@2.7.0.rbi +8 -0
- data/sorbet/rbi/gems/anyway_config.rbi +197 -0
- data/sorbet/rbi/gems/anyway_config@2.1.0.rbi +8 -0
- data/sorbet/rbi/gems/aruba.rbi +917 -0
- data/sorbet/rbi/gems/aruba@0.14.14.rbi +1342 -0
- data/sorbet/rbi/gems/ast.rbi +49 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +54 -0
- data/sorbet/rbi/gems/axiom-types@0.1.1.rbi +8 -0
- data/sorbet/rbi/gems/builder@3.2.4.rbi +15 -0
- data/sorbet/rbi/gems/childprocess.rbi +107 -0
- data/sorbet/rbi/gems/childprocess@3.0.0.rbi +135 -0
- data/sorbet/rbi/gems/coderay.rbi +285 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +1005 -0
- data/sorbet/rbi/gems/coercible@1.0.0.rbi +8 -0
- data/sorbet/rbi/gems/colorize.rbi +82 -0
- data/sorbet/rbi/gems/colorize@0.8.1.rbi +39 -0
- data/sorbet/rbi/gems/commander@4.6.0.rbi +8 -0
- data/sorbet/rbi/gems/concurrent-ruby.rbi +1590 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.1.8.rbi +8 -0
- data/sorbet/rbi/gems/config.rbi +124 -0
- data/sorbet/rbi/gems/config@3.1.0.rbi +8 -0
- data/sorbet/rbi/gems/contracts.rbi +391 -0
- data/sorbet/rbi/gems/contracts@0.16.1.rbi +592 -0
- data/sorbet/rbi/gems/cucumber-core.rbi +628 -0
- data/sorbet/rbi/gems/cucumber-core@9.0.0.rbi +8 -0
- data/sorbet/rbi/gems/cucumber-create-meta.rbi +27 -0
- data/sorbet/rbi/gems/cucumber-create-meta@4.0.0.rbi +8 -0
- data/sorbet/rbi/gems/cucumber-cucumber-expressions.rbi +216 -0
- data/sorbet/rbi/gems/cucumber-cucumber-expressions@12.1.1.rbi +8 -0
- data/sorbet/rbi/gems/cucumber-gherkin.rbi +289 -0
- data/sorbet/rbi/gems/cucumber-gherkin@18.1.1.rbi +8 -0
- data/sorbet/rbi/gems/cucumber-html-formatter@13.0.0.rbi +8 -0
- data/sorbet/rbi/gems/cucumber-messages.rbi +872 -0
- data/sorbet/rbi/gems/cucumber-messages@15.0.0.rbi +8 -0
- data/sorbet/rbi/gems/cucumber-tag-expressions.rbi +53 -0
- data/sorbet/rbi/gems/cucumber-tag-expressions@3.0.1.rbi +8 -0
- data/sorbet/rbi/gems/cucumber-wire.rbi +161 -0
- data/sorbet/rbi/gems/cucumber-wire@5.0.0.rbi +8 -0
- data/sorbet/rbi/gems/cucumber.rbi +1876 -0
- data/sorbet/rbi/gems/cucumber@6.0.0.rbi +8 -0
- data/sorbet/rbi/gems/declarative.rbi +75 -0
- data/sorbet/rbi/gems/declarative@0.0.20.rbi +8 -0
- data/sorbet/rbi/gems/deep_merge.rbi +26 -0
- data/sorbet/rbi/gems/deep_merge@1.2.1.rbi +8 -0
- data/sorbet/rbi/gems/descendants_tracker@0.0.4.rbi +8 -0
- data/sorbet/rbi/gems/diff-lcs@1.4.4.rbi +8 -0
- data/sorbet/rbi/gems/dry-configurable@0.12.1.rbi +8 -0
- data/sorbet/rbi/gems/dry-container@0.7.2.rbi +8 -0
- data/sorbet/rbi/gems/dry-core@0.5.0.rbi +8 -0
- data/sorbet/rbi/gems/dry-equalizer@0.3.0.rbi +8 -0
- data/sorbet/rbi/gems/dry-inflector@0.2.0.rbi +8 -0
- data/sorbet/rbi/gems/dry-initializer@3.0.4.rbi +8 -0
- data/sorbet/rbi/gems/dry-logic@1.2.0.rbi +8 -0
- data/sorbet/rbi/gems/dry-schema@1.6.2.rbi +8 -0
- data/sorbet/rbi/gems/dry-types@1.5.1.rbi +8 -0
- data/sorbet/rbi/gems/dry-validation@1.6.0.rbi +8 -0
- data/sorbet/rbi/gems/equalizer.rbi +23 -0
- data/sorbet/rbi/gems/equalizer@0.0.11.rbi +8 -0
- data/sorbet/rbi/gems/equatable.rbi +26 -0
- data/sorbet/rbi/gems/equatable@0.5.0.rbi +8 -0
- data/sorbet/rbi/gems/excon.rbi +378 -0
- data/sorbet/rbi/gems/excon@0.81.0.rbi +8 -0
- data/sorbet/rbi/gems/faraday-excon.rbi +28 -0
- data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +8 -0
- data/sorbet/rbi/gems/faraday-net_http.rbi +32 -0
- data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +8 -0
- data/sorbet/rbi/gems/faraday-net_http_persistent.rbi +24 -0
- data/sorbet/rbi/gems/faraday-net_http_persistent@1.1.0.rbi +8 -0
- data/sorbet/rbi/gems/faraday.rbi +606 -0
- data/sorbet/rbi/gems/faraday@1.4.1.rbi +8 -0
- data/sorbet/rbi/gems/faraday_middleware.rbi +19 -0
- data/sorbet/rbi/gems/faraday_middleware@1.0.0.rbi +8 -0
- data/sorbet/rbi/gems/ffi.rbi +560 -0
- data/sorbet/rbi/gems/ffi@1.15.0.rbi +849 -0
- data/sorbet/rbi/gems/formatador.rbi +52 -0
- data/sorbet/rbi/gems/formatador@0.2.5.rbi +8 -0
- data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +49 -0
- data/sorbet/rbi/gems/guard-rspec@4.7.3.rbi +233 -0
- data/sorbet/rbi/gems/guard.rbi +397 -0
- data/sorbet/rbi/gems/guard@2.16.2.rbi +615 -0
- data/sorbet/rbi/gems/highline.rbi +567 -0
- data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
- data/sorbet/rbi/gems/i18n.rbi +133 -0
- data/sorbet/rbi/gems/i18n@1.8.10.rbi +8 -0
- data/sorbet/rbi/gems/ice_nine@0.11.2.rbi +8 -0
- data/sorbet/rbi/gems/listen.rbi +301 -0
- data/sorbet/rbi/gems/listen@3.5.1.rbi +476 -0
- data/sorbet/rbi/gems/lumberjack.rbi +299 -0
- data/sorbet/rbi/gems/lumberjack@1.2.8.rbi +431 -0
- data/sorbet/rbi/gems/method_source.rbi +64 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +72 -0
- data/sorbet/rbi/gems/middleware.rbi +32 -0
- data/sorbet/rbi/gems/middleware@0.1.0.rbi +8 -0
- data/sorbet/rbi/gems/mime-types-data.rbi +17 -0
- data/sorbet/rbi/gems/mime-types-data@3.2021.0225.rbi +8 -0
- data/sorbet/rbi/gems/mime-types.rbi +218 -0
- data/sorbet/rbi/gems/mime-types@3.3.1.rbi +8 -0
- data/sorbet/rbi/gems/mini_mime.rbi +52 -0
- data/sorbet/rbi/gems/mini_mime@1.1.0.rbi +8 -0
- data/sorbet/rbi/gems/minitest@5.14.4.rbi +8 -0
- data/sorbet/rbi/gems/multi_json.rbi +62 -0
- data/sorbet/rbi/gems/multi_json@1.15.0.rbi +8 -0
- data/sorbet/rbi/gems/multi_test.rbi +28 -0
- data/sorbet/rbi/gems/multi_test@0.1.2.rbi +8 -0
- data/sorbet/rbi/gems/multipart-post.rbi +53 -0
- data/sorbet/rbi/gems/multipart-post@2.1.1.rbi +8 -0
- data/sorbet/rbi/gems/necromancer.rbi +135 -0
- data/sorbet/rbi/gems/necromancer@0.3.0.rbi +8 -0
- data/sorbet/rbi/gems/nenv.rbi +60 -0
- data/sorbet/rbi/gems/nenv@0.3.0.rbi +88 -0
- data/sorbet/rbi/gems/notiffany.rbi +215 -0
- data/sorbet/rbi/gems/notiffany@0.1.3.rbi +323 -0
- data/sorbet/rbi/gems/paint.rbi +31 -0
- data/sorbet/rbi/gems/paint@2.2.1.rbi +8 -0
- data/sorbet/rbi/gems/parlour.rbi +840 -0
- data/sorbet/rbi/gems/parlour@6.0.0.rbi +1610 -0
- data/sorbet/rbi/gems/parser.rbi +1517 -0
- data/sorbet/rbi/gems/parser@3.0.1.1.rbi +1726 -0
- data/sorbet/rbi/gems/pastel.rbi +128 -0
- data/sorbet/rbi/gems/pastel@0.6.1.rbi +8 -0
- data/sorbet/rbi/gems/protobuf-cucumber.rbi +1520 -0
- data/sorbet/rbi/gems/protobuf-cucumber@3.10.8.rbi +8 -0
- data/sorbet/rbi/gems/pry.rbi +1898 -0
- data/sorbet/rbi/gems/pry@0.14.1.rbi +2486 -0
- data/sorbet/rbi/gems/public_suffix.rbi +104 -0
- data/sorbet/rbi/gems/public_suffix@4.0.6.rbi +8 -0
- data/sorbet/rbi/gems/rainbow.rbi +118 -0
- data/sorbet/rbi/gems/rainbow@3.0.0.rbi +153 -0
- data/sorbet/rbi/gems/rake.rbi +647 -0
- data/sorbet/rbi/gems/rake@10.5.0.rbi +805 -0
- data/sorbet/rbi/gems/rb-fsevent@0.11.0.rbi +8 -0
- data/sorbet/rbi/gems/rb-inotify@0.10.1.rbi +8 -0
- data/sorbet/rbi/gems/representable.rbi +227 -0
- data/sorbet/rbi/gems/representable@3.1.1.rbi +8 -0
- data/sorbet/rbi/gems/rspec-core.rbi +1932 -0
- data/sorbet/rbi/gems/rspec-core@3.10.1.rbi +2455 -0
- data/sorbet/rbi/gems/rspec-expectations.rbi +1151 -0
- data/sorbet/rbi/gems/rspec-expectations@3.10.1.rbi +1652 -0
- data/sorbet/rbi/gems/rspec-mocks.rbi +1100 -0
- data/sorbet/rbi/gems/rspec-mocks@3.10.2.rbi +1462 -0
- data/sorbet/rbi/gems/rspec-support.rbi +280 -0
- data/sorbet/rbi/gems/rspec-support@3.10.2.rbi +509 -0
- data/sorbet/rbi/gems/rspec.rbi +15 -0
- data/sorbet/rbi/gems/rspec@3.10.0.rbi +38 -0
- data/sorbet/rbi/gems/ruby-next-core.rbi +76 -0
- data/sorbet/rbi/gems/ruby-next-core@0.12.0.rbi +7 -0
- data/sorbet/rbi/gems/ruby2_keywords@0.0.4.rbi +8 -0
- data/sorbet/rbi/gems/shellany.rbi +29 -0
- data/sorbet/rbi/gems/shellany@0.0.1.rbi +28 -0
- data/sorbet/rbi/gems/spoom.rbi +872 -0
- data/sorbet/rbi/gems/spoom@1.1.1.rbi +1193 -0
- data/sorbet/rbi/gems/sys-uname.rbi +66 -0
- data/sorbet/rbi/gems/sys-uname@1.2.2.rbi +8 -0
- data/sorbet/rbi/gems/tapioca.rbi +39 -0
- data/sorbet/rbi/gems/tapioca@0.4.23.rbi +1230 -0
- data/sorbet/rbi/gems/terminal-table.rbi +166 -0
- data/sorbet/rbi/gems/terminal-table@3.0.0.rbi +8 -0
- data/sorbet/rbi/gems/thor.rbi +537 -0
- data/sorbet/rbi/gems/thor@1.1.0.rbi +838 -0
- data/sorbet/rbi/gems/thread_safe@0.3.6.rbi +8 -0
- data/sorbet/rbi/gems/tracker_api.rbi +33 -0
- data/sorbet/rbi/gems/tracker_api@1.13.0.rbi +21 -0
- data/sorbet/rbi/gems/trailblazer-option.rbi +22 -0
- data/sorbet/rbi/gems/trailblazer-option@0.1.1.rbi +8 -0
- data/sorbet/rbi/gems/tty-color.rbi +41 -0
- data/sorbet/rbi/gems/tty-color@0.3.0.rbi +8 -0
- data/sorbet/rbi/gems/tty-command@0.1.0.rbi +8 -0
- data/sorbet/rbi/gems/tty-cursor@0.3.0.rbi +8 -0
- data/sorbet/rbi/gems/tty-pager.rbi +41 -0
- data/sorbet/rbi/gems/tty-pager@0.4.0.rbi +8 -0
- data/sorbet/rbi/gems/tty-platform.rbi +36 -0
- data/sorbet/rbi/gems/tty-platform@0.1.0.rbi +8 -0
- data/sorbet/rbi/gems/tty-progressbar.rbi +164 -0
- data/sorbet/rbi/gems/tty-progressbar@0.9.0.rbi +8 -0
- data/sorbet/rbi/gems/tty-prompt@0.6.0.rbi +8 -0
- data/sorbet/rbi/gems/tty-screen.rbi +40 -0
- data/sorbet/rbi/gems/tty-screen@0.5.1.rbi +8 -0
- data/sorbet/rbi/gems/tty-spinner.rbi +40 -0
- data/sorbet/rbi/gems/tty-spinner@0.2.0.rbi +8 -0
- data/sorbet/rbi/gems/tty-table.rbi +417 -0
- data/sorbet/rbi/gems/tty-table@0.5.0.rbi +8 -0
- data/sorbet/rbi/gems/tty-which.rbi +22 -0
- data/sorbet/rbi/gems/tty-which@0.1.0.rbi +8 -0
- data/sorbet/rbi/gems/tty.rbi +126 -0
- data/sorbet/rbi/gems/tty@0.5.0.rbi +8 -0
- data/sorbet/rbi/gems/tzinfo.rbi +588 -0
- data/sorbet/rbi/gems/tzinfo@2.0.4.rbi +8 -0
- data/sorbet/rbi/gems/uber.rbi +18 -0
- data/sorbet/rbi/gems/uber@0.1.0.rbi +8 -0
- data/sorbet/rbi/gems/unicode-display_width.rbi +17 -0
- data/sorbet/rbi/gems/unicode-display_width@1.7.0.rbi +8 -0
- data/sorbet/rbi/gems/unicode_utils.rbi +171 -0
- data/sorbet/rbi/gems/unicode_utils@1.4.0.rbi +8 -0
- data/sorbet/rbi/gems/vcr.rbi +582 -0
- data/sorbet/rbi/gems/vcr@6.0.0.rbi +782 -0
- data/sorbet/rbi/gems/verse.rbi +87 -0
- data/sorbet/rbi/gems/verse@0.4.0.rbi +8 -0
- data/sorbet/rbi/gems/virtus@1.0.5.rbi +8 -0
- data/sorbet/rbi/gems/wisper@1.6.1.rbi +8 -0
- data/sorbet/rbi/gems/zeitwerk.rbi +139 -0
- data/sorbet/rbi/gems/zeitwerk@2.4.2.rbi +8 -0
- data/sorbet/rbi/hidden-definitions/errors.txt +8695 -0
- data/sorbet/rbi/hidden-definitions/hidden.rbi +18529 -0
- data/sorbet/rbi/sorbet-typed/lib/activesupport/>=6/activesupport.rbi +37 -0
- data/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +1850 -0
- data/sorbet/rbi/sorbet-typed/lib/faraday/all/faraday.rbi +756 -0
- data/sorbet/rbi/sorbet-typed/lib/minitest/all/minitest.rbi +108 -0
- data/sorbet/rbi/sorbet-typed/lib/parlour/6.0.0/parlour.rbi +1903 -0
- data/sorbet/rbi/sorbet-typed/lib/rainbow/all/rainbow.rbi +276 -0
- data/sorbet/rbi/sorbet-typed/lib/rake/all/rake.rbi +645 -0
- data/sorbet/rbi/sorbet-typed/lib/rspec-core/all/rspec-core.rbi +1891 -0
- data/sorbet/rbi/sorbet-typed/lib/thor/all/thor.rbi +905 -0
- data/sorbet/rbi/todo.rbi +23 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +341 -23
@@ -0,0 +1,592 @@
|
|
1
|
+
# DO NOT EDIT MANUALLY
|
2
|
+
# This is an autogenerated file for types exported from the `contracts` gem.
|
3
|
+
# Please instead update this file by running `bin/tapioca sync`.
|
4
|
+
|
5
|
+
# typed: true
|
6
|
+
|
7
|
+
class Contract < ::Contracts::Decorator
|
8
|
+
include ::Contracts::CallWith
|
9
|
+
extend ::Contracts::Validators
|
10
|
+
|
11
|
+
def initialize(klass, method, *contracts); end
|
12
|
+
|
13
|
+
def [](*args, &blk); end
|
14
|
+
def args_contracts; end
|
15
|
+
def call(*args, &blk); end
|
16
|
+
def failure_exception; end
|
17
|
+
def klass; end
|
18
|
+
def maybe_append_block!(args, blk); end
|
19
|
+
def maybe_append_options!(args, blk); end
|
20
|
+
def method; end
|
21
|
+
def pattern_match!; end
|
22
|
+
def pattern_match?; end
|
23
|
+
def pretty_contract(c); end
|
24
|
+
def ret_contract; end
|
25
|
+
def to_s; end
|
26
|
+
|
27
|
+
class << self
|
28
|
+
def failure_callback(data, use_pattern_matching = T.unsafe(nil)); end
|
29
|
+
def failure_msg(data); end
|
30
|
+
def fetch_failure_callback; end
|
31
|
+
def override_failure_callback(&blk); end
|
32
|
+
def restore_failure_callback; end
|
33
|
+
def valid?(arg, contract); end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
Contract::DEFAULT_FAILURE_CALLBACK = T.let(T.unsafe(nil), Proc)
|
38
|
+
|
39
|
+
class ContractBaseError < ::ArgumentError
|
40
|
+
def initialize(message, data); end
|
41
|
+
|
42
|
+
def data; end
|
43
|
+
def to_contract_error; end
|
44
|
+
end
|
45
|
+
|
46
|
+
class ContractError < ::ContractBaseError; end
|
47
|
+
|
48
|
+
module Contracts
|
49
|
+
include ::Contracts::Attrs
|
50
|
+
include ::Contracts::Builtin
|
51
|
+
include ::Contracts::Core
|
52
|
+
|
53
|
+
class << self
|
54
|
+
def extended(base); end
|
55
|
+
def included(base); end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
module Contracts::Attrs
|
60
|
+
def attr_accessor_with_contract(*names, contract); end
|
61
|
+
def attr_reader_with_contract(*names, contract); end
|
62
|
+
def attr_writer_with_contract(*names, contract); end
|
63
|
+
end
|
64
|
+
|
65
|
+
module Contracts::Builtin; end
|
66
|
+
|
67
|
+
class Contracts::Builtin::And < ::Contracts::Builtin::CallableClass
|
68
|
+
def initialize(*vals); end
|
69
|
+
|
70
|
+
def to_s; end
|
71
|
+
def valid?(val); end
|
72
|
+
end
|
73
|
+
|
74
|
+
class Contracts::Builtin::Any
|
75
|
+
class << self
|
76
|
+
def valid?(val); end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
class Contracts::Builtin::Args < ::Contracts::Builtin::CallableClass
|
81
|
+
def initialize(contract); end
|
82
|
+
|
83
|
+
def contract; end
|
84
|
+
def to_s; end
|
85
|
+
end
|
86
|
+
|
87
|
+
Contracts::Builtin::ArrayOf = T.let(T.unsafe(nil), Contracts::Builtin::CollectionOf::Factory)
|
88
|
+
|
89
|
+
class Contracts::Builtin::Bool
|
90
|
+
class << self
|
91
|
+
def valid?(val); end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
class Contracts::Builtin::CallableClass
|
96
|
+
include ::Contracts::Formatters
|
97
|
+
|
98
|
+
class << self
|
99
|
+
def [](*vals); end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
class Contracts::Builtin::CollectionOf < ::Contracts::Builtin::CallableClass
|
104
|
+
def initialize(collection_class, contract); end
|
105
|
+
|
106
|
+
def to_s; end
|
107
|
+
def valid?(vals); end
|
108
|
+
end
|
109
|
+
|
110
|
+
class Contracts::Builtin::CollectionOf::Factory
|
111
|
+
def initialize(collection_class, &before_new); end
|
112
|
+
|
113
|
+
def [](contract); end
|
114
|
+
def new(contract); end
|
115
|
+
end
|
116
|
+
|
117
|
+
class Contracts::Builtin::DescendantOf < ::Contracts::Builtin::CallableClass
|
118
|
+
def initialize(parent_class); end
|
119
|
+
|
120
|
+
def inspect; end
|
121
|
+
def to_s; end
|
122
|
+
def valid?(given_class); end
|
123
|
+
|
124
|
+
private
|
125
|
+
|
126
|
+
def parent_class; end
|
127
|
+
end
|
128
|
+
|
129
|
+
class Contracts::Builtin::Enum < ::Contracts::Builtin::CallableClass
|
130
|
+
def initialize(*vals); end
|
131
|
+
|
132
|
+
def valid?(val); end
|
133
|
+
end
|
134
|
+
|
135
|
+
class Contracts::Builtin::Eq < ::Contracts::Builtin::CallableClass
|
136
|
+
def initialize(value); end
|
137
|
+
|
138
|
+
def to_s; end
|
139
|
+
def valid?(val); end
|
140
|
+
end
|
141
|
+
|
142
|
+
class Contracts::Builtin::Exactly < ::Contracts::Builtin::CallableClass
|
143
|
+
def initialize(cls); end
|
144
|
+
|
145
|
+
def to_s; end
|
146
|
+
def valid?(val); end
|
147
|
+
end
|
148
|
+
|
149
|
+
class Contracts::Builtin::Func < ::Contracts::Builtin::CallableClass
|
150
|
+
def initialize(*contracts); end
|
151
|
+
|
152
|
+
def contracts; end
|
153
|
+
end
|
154
|
+
|
155
|
+
class Contracts::Builtin::HashOf < ::Contracts::Builtin::CallableClass
|
156
|
+
def initialize(key, value = T.unsafe(nil)); end
|
157
|
+
|
158
|
+
def to_s; end
|
159
|
+
def valid?(hash); end
|
160
|
+
|
161
|
+
private
|
162
|
+
|
163
|
+
def validate_hash(hash); end
|
164
|
+
end
|
165
|
+
|
166
|
+
Contracts::Builtin::HashOf::INVALID_KEY_VALUE_PAIR = T.let(T.unsafe(nil), String)
|
167
|
+
|
168
|
+
class Contracts::Builtin::Int
|
169
|
+
class << self
|
170
|
+
def valid?(val); end
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
class Contracts::Builtin::KeywordArgs < ::Contracts::Builtin::CallableClass
|
175
|
+
def initialize(options); end
|
176
|
+
|
177
|
+
def inspect; end
|
178
|
+
def to_s; end
|
179
|
+
def valid?(hash); end
|
180
|
+
|
181
|
+
private
|
182
|
+
|
183
|
+
def options; end
|
184
|
+
end
|
185
|
+
|
186
|
+
class Contracts::Builtin::Maybe < ::Contracts::Builtin::Or
|
187
|
+
def initialize(*vals); end
|
188
|
+
|
189
|
+
def include_proc?; end
|
190
|
+
end
|
191
|
+
|
192
|
+
class Contracts::Builtin::Nat
|
193
|
+
class << self
|
194
|
+
def valid?(val); end
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
class Contracts::Builtin::NatPos
|
199
|
+
class << self
|
200
|
+
def valid?(val); end
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
class Contracts::Builtin::Neg
|
205
|
+
class << self
|
206
|
+
def valid?(val); end
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
class Contracts::Builtin::None
|
211
|
+
class << self
|
212
|
+
def valid?(val); end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
class Contracts::Builtin::Not < ::Contracts::Builtin::CallableClass
|
217
|
+
def initialize(*vals); end
|
218
|
+
|
219
|
+
def to_s; end
|
220
|
+
def valid?(val); end
|
221
|
+
end
|
222
|
+
|
223
|
+
class Contracts::Builtin::Num
|
224
|
+
class << self
|
225
|
+
def valid?(val); end
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
class Contracts::Builtin::Optional < ::Contracts::Builtin::CallableClass
|
230
|
+
def initialize(contract); end
|
231
|
+
|
232
|
+
def inspect; end
|
233
|
+
def to_s; end
|
234
|
+
def valid?(value); end
|
235
|
+
def within_opt_hash!; end
|
236
|
+
|
237
|
+
private
|
238
|
+
|
239
|
+
def contract; end
|
240
|
+
def ensure_within_opt_hash; end
|
241
|
+
def formatted_contract; end
|
242
|
+
def within_opt_hash; end
|
243
|
+
|
244
|
+
class << self
|
245
|
+
def _valid?(hash, key, contract); end
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
Contracts::Builtin::Optional::UNABLE_TO_USE_OUTSIDE_OF_OPT_HASH = T.let(T.unsafe(nil), String)
|
250
|
+
|
251
|
+
class Contracts::Builtin::Or < ::Contracts::Builtin::CallableClass
|
252
|
+
def initialize(*vals); end
|
253
|
+
|
254
|
+
def to_s; end
|
255
|
+
def valid?(val); end
|
256
|
+
end
|
257
|
+
|
258
|
+
class Contracts::Builtin::Pos
|
259
|
+
class << self
|
260
|
+
def valid?(val); end
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
class Contracts::Builtin::RangeOf < ::Contracts::Builtin::CallableClass
|
265
|
+
def initialize(contract); end
|
266
|
+
|
267
|
+
def to_s; end
|
268
|
+
def valid?(val); end
|
269
|
+
end
|
270
|
+
|
271
|
+
class Contracts::Builtin::RespondTo < ::Contracts::Builtin::CallableClass
|
272
|
+
def initialize(*meths); end
|
273
|
+
|
274
|
+
def to_s; end
|
275
|
+
def valid?(val); end
|
276
|
+
end
|
277
|
+
|
278
|
+
class Contracts::Builtin::Send < ::Contracts::Builtin::CallableClass
|
279
|
+
def initialize(*meths); end
|
280
|
+
|
281
|
+
def to_s; end
|
282
|
+
def valid?(val); end
|
283
|
+
end
|
284
|
+
|
285
|
+
Contracts::Builtin::SetOf = T.let(T.unsafe(nil), Contracts::Builtin::CollectionOf::Factory)
|
286
|
+
|
287
|
+
class Contracts::Builtin::StrictHash < ::Contracts::Builtin::CallableClass
|
288
|
+
def initialize(contract_hash); end
|
289
|
+
|
290
|
+
def contract_hash; end
|
291
|
+
def valid?(arg); end
|
292
|
+
end
|
293
|
+
|
294
|
+
class Contracts::Builtin::Xor < ::Contracts::Builtin::CallableClass
|
295
|
+
def initialize(*vals); end
|
296
|
+
|
297
|
+
def to_s; end
|
298
|
+
def valid?(val); end
|
299
|
+
end
|
300
|
+
|
301
|
+
module Contracts::CallWith
|
302
|
+
def call_with(this, *args, &blk); end
|
303
|
+
def call_with_inner(returns, this, *args, &blk); end
|
304
|
+
end
|
305
|
+
|
306
|
+
class Contracts::ContractsNotIncluded < ::TypeError
|
307
|
+
def initialize(message = T.unsafe(nil)); end
|
308
|
+
|
309
|
+
def message; end
|
310
|
+
def to_s; end
|
311
|
+
end
|
312
|
+
|
313
|
+
Contracts::ContractsNotIncluded::DEFAULT_MESSAGE = T.let(T.unsafe(nil), String)
|
314
|
+
|
315
|
+
module Contracts::Core
|
316
|
+
mixes_in_class_methods ::Contracts
|
317
|
+
|
318
|
+
class << self
|
319
|
+
def common(base); end
|
320
|
+
def extended(base); end
|
321
|
+
def included(base); end
|
322
|
+
end
|
323
|
+
end
|
324
|
+
|
325
|
+
class Contracts::Decorator
|
326
|
+
def initialize(klass, method); end
|
327
|
+
|
328
|
+
class << self
|
329
|
+
def decorators; end
|
330
|
+
def decorators=(_arg0); end
|
331
|
+
def inherited(klass); end
|
332
|
+
end
|
333
|
+
end
|
334
|
+
|
335
|
+
module Contracts::Engine
|
336
|
+
class << self
|
337
|
+
def applied?(*args, &block); end
|
338
|
+
def apply(*args, &block); end
|
339
|
+
def fetch_from(*args, &block); end
|
340
|
+
|
341
|
+
private
|
342
|
+
|
343
|
+
def base_engine; end
|
344
|
+
end
|
345
|
+
end
|
346
|
+
|
347
|
+
class Contracts::Engine::Base
|
348
|
+
def initialize(klass); end
|
349
|
+
|
350
|
+
def add_method_decorator(type, name, decorator); end
|
351
|
+
def all_decorators; end
|
352
|
+
def decorate(decorator_class, *args); end
|
353
|
+
def decorated_methods?; end
|
354
|
+
def decorated_methods_for(type, name); end
|
355
|
+
def nearest_decorated_ancestor; end
|
356
|
+
def set_eigenclass_owner; end
|
357
|
+
|
358
|
+
private
|
359
|
+
|
360
|
+
def clear_decorators; end
|
361
|
+
def decorated_methods; end
|
362
|
+
def decorators; end
|
363
|
+
def eigenclass; end
|
364
|
+
def eigenclass_engine; end
|
365
|
+
def klass; end
|
366
|
+
def pop_decorators; end
|
367
|
+
def validate!; end
|
368
|
+
|
369
|
+
class << self
|
370
|
+
def applied?(klass); end
|
371
|
+
def apply(klass); end
|
372
|
+
def fetch_from(klass); end
|
373
|
+
end
|
374
|
+
end
|
375
|
+
|
376
|
+
class Contracts::Engine::Eigenclass < ::Contracts::Engine::Base
|
377
|
+
def all_decorators; end
|
378
|
+
def owner_class; end
|
379
|
+
def owner_class=(_arg0); end
|
380
|
+
def set_eigenclass_owner; end
|
381
|
+
|
382
|
+
private
|
383
|
+
|
384
|
+
def owner?; end
|
385
|
+
def validate!; end
|
386
|
+
|
387
|
+
class << self
|
388
|
+
def lift(eigenclass, owner); end
|
389
|
+
end
|
390
|
+
end
|
391
|
+
|
392
|
+
class Contracts::Engine::Target
|
393
|
+
def initialize(target); end
|
394
|
+
|
395
|
+
def applied?; end
|
396
|
+
def apply(engine_class = T.unsafe(nil)); end
|
397
|
+
def engine; end
|
398
|
+
|
399
|
+
private
|
400
|
+
|
401
|
+
def apply_to_eigenclass; end
|
402
|
+
def eigenclass; end
|
403
|
+
def meaningless_eigenclass?; end
|
404
|
+
def target; end
|
405
|
+
end
|
406
|
+
|
407
|
+
module Contracts::Formatters; end
|
408
|
+
|
409
|
+
class Contracts::Formatters::ClassInspectWrapper
|
410
|
+
include ::Contracts::Formatters::InspectWrapper
|
411
|
+
|
412
|
+
def custom_to_s?; end
|
413
|
+
def useful_inspect; end
|
414
|
+
end
|
415
|
+
|
416
|
+
class Contracts::Formatters::Expected
|
417
|
+
def initialize(contract, full = T.unsafe(nil)); end
|
418
|
+
|
419
|
+
def array_contract(array); end
|
420
|
+
def contract(contract = T.unsafe(nil)); end
|
421
|
+
def hash_contract(hash); end
|
422
|
+
end
|
423
|
+
|
424
|
+
module Contracts::Formatters::InspectWrapper
|
425
|
+
def initialize(value, full); end
|
426
|
+
|
427
|
+
def delim(value); end
|
428
|
+
def inspect; end
|
429
|
+
def to_s; end
|
430
|
+
|
431
|
+
private
|
432
|
+
|
433
|
+
def empty_to_s?; end
|
434
|
+
def empty_val?; end
|
435
|
+
def full?; end
|
436
|
+
def plain?; end
|
437
|
+
def strip_prefix(val); end
|
438
|
+
def useful_to_s?; end
|
439
|
+
|
440
|
+
class << self
|
441
|
+
def create(value, full = T.unsafe(nil)); end
|
442
|
+
end
|
443
|
+
end
|
444
|
+
|
445
|
+
class Contracts::Formatters::ObjectInspectWrapper
|
446
|
+
include ::Contracts::Formatters::InspectWrapper
|
447
|
+
|
448
|
+
def custom_to_s?; end
|
449
|
+
def useful_inspect; end
|
450
|
+
end
|
451
|
+
|
452
|
+
module Contracts::Invariants
|
453
|
+
mixes_in_class_methods ::Contracts::Invariants::InvariantExtension
|
454
|
+
|
455
|
+
def verify_invariants!(method); end
|
456
|
+
|
457
|
+
class << self
|
458
|
+
def common(base); end
|
459
|
+
def extended(base); end
|
460
|
+
def included(base); end
|
461
|
+
end
|
462
|
+
end
|
463
|
+
|
464
|
+
class Contracts::Invariants::Invariant
|
465
|
+
def initialize(klass, name, &condition); end
|
466
|
+
|
467
|
+
def check_on(target, method); end
|
468
|
+
def expected; end
|
469
|
+
|
470
|
+
class << self
|
471
|
+
def failure_callback(data); end
|
472
|
+
def failure_msg(data); end
|
473
|
+
end
|
474
|
+
end
|
475
|
+
|
476
|
+
module Contracts::Invariants::InvariantExtension
|
477
|
+
def invariant(name, &condition); end
|
478
|
+
def invariants; end
|
479
|
+
end
|
480
|
+
|
481
|
+
module Contracts::MethodDecorators
|
482
|
+
def Contract(*args, &blk); end
|
483
|
+
def inherited(subclass); end
|
484
|
+
def method_added(name); end
|
485
|
+
def singleton_method_added(name); end
|
486
|
+
|
487
|
+
class << self
|
488
|
+
def extended(klass); end
|
489
|
+
end
|
490
|
+
end
|
491
|
+
|
492
|
+
class Contracts::MethodHandler
|
493
|
+
def initialize(method_name, is_class_method, target); end
|
494
|
+
|
495
|
+
def handle; end
|
496
|
+
|
497
|
+
private
|
498
|
+
|
499
|
+
def _method_type; end
|
500
|
+
def decorated_methods; end
|
501
|
+
def decorator; end
|
502
|
+
def decorator_args; end
|
503
|
+
def decorator_class; end
|
504
|
+
def decorators; end
|
505
|
+
def engine; end
|
506
|
+
def engine?; end
|
507
|
+
def ignore_decorators?; end
|
508
|
+
def is_class_method; end
|
509
|
+
def mark_pattern_matching_decorators; end
|
510
|
+
def method_name; end
|
511
|
+
def method_reference; end
|
512
|
+
def method_type; end
|
513
|
+
def pattern_matching?; end
|
514
|
+
def raw_method; end
|
515
|
+
def redefine_method; end
|
516
|
+
def target; end
|
517
|
+
def validate_decorators!; end
|
518
|
+
def validate_pattern_matching!; end
|
519
|
+
end
|
520
|
+
|
521
|
+
Contracts::MethodHandler::METHOD_REFERENCE_FACTORY = T.let(T.unsafe(nil), Hash)
|
522
|
+
Contracts::MethodHandler::RAW_METHOD_STRATEGY = T.let(T.unsafe(nil), Hash)
|
523
|
+
|
524
|
+
class Contracts::MethodReference
|
525
|
+
def initialize(name, method); end
|
526
|
+
|
527
|
+
def make_alias(this); end
|
528
|
+
def make_definition(this, &blk); end
|
529
|
+
def method_position; end
|
530
|
+
def name; end
|
531
|
+
def send_to(this, *args, &blk); end
|
532
|
+
|
533
|
+
private
|
534
|
+
|
535
|
+
def alias_target(this); end
|
536
|
+
def aliased_name; end
|
537
|
+
def construct_unique_name; end
|
538
|
+
def make_private(this); end
|
539
|
+
def make_protected(this); end
|
540
|
+
def private?(this); end
|
541
|
+
def protected?(this); end
|
542
|
+
end
|
543
|
+
|
544
|
+
class Contracts::SingletonMethodReference < ::Contracts::MethodReference
|
545
|
+
private
|
546
|
+
|
547
|
+
def alias_target(this); end
|
548
|
+
def private?(this); end
|
549
|
+
def protected?(this); end
|
550
|
+
end
|
551
|
+
|
552
|
+
module Contracts::Support
|
553
|
+
class << self
|
554
|
+
def contract_id(contract); end
|
555
|
+
def eigenclass?(target); end
|
556
|
+
def eigenclass_hierarchy_supported?; end
|
557
|
+
def eigenclass_of(target); end
|
558
|
+
def indent_string(string, amount); end
|
559
|
+
def method_name(method); end
|
560
|
+
def method_position(method); end
|
561
|
+
def unique_id; end
|
562
|
+
|
563
|
+
private
|
564
|
+
|
565
|
+
def module_eigenclass?(target); end
|
566
|
+
end
|
567
|
+
end
|
568
|
+
|
569
|
+
module Contracts::Validators
|
570
|
+
def clean_memoized_validators; end
|
571
|
+
def make_validator(contract); end
|
572
|
+
def make_validator!(contract); end
|
573
|
+
def memoized_validators; end
|
574
|
+
def override_validator(name, &block); end
|
575
|
+
def reset_validators; end
|
576
|
+
def restore_validators; end
|
577
|
+
def validator_strategies; end
|
578
|
+
end
|
579
|
+
|
580
|
+
Contracts::Validators::DEFAULT_VALIDATOR_STRATEGIES = T.let(T.unsafe(nil), Hash)
|
581
|
+
|
582
|
+
class InvariantError < ::StandardError
|
583
|
+
def to_contract_error; end
|
584
|
+
end
|
585
|
+
|
586
|
+
class ParamContractError < ::ContractError; end
|
587
|
+
|
588
|
+
class PatternMatchingError < ::ContractBaseError
|
589
|
+
def to_contract_error; end
|
590
|
+
end
|
591
|
+
|
592
|
+
class ReturnContractError < ::ContractError; end
|