checkoff 0.222.0 → 0.223.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.git-hooks/pre_commit/circle_ci.rb +1 -0
- data/.git-hooks/pre_commit/punchlist.rb +1 -0
- data/.git-hooks/pre_commit/solargraph_typecheck.rb +1 -0
- data/.gitignore +4 -0
- data/.markdownlint_style.rb +1 -0
- data/.overcommit.yml +1 -0
- data/.yardopts +2 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +16 -1
- data/Makefile +24 -6
- data/config/annotations_asana.rb +1 -2
- data/lib/checkoff/attachments.rb +1 -0
- data/lib/checkoff/cli.rb +1 -1
- data/lib/checkoff/clients.rb +1 -0
- data/lib/checkoff/custom_fields.rb +1 -0
- data/lib/checkoff/events.rb +1 -0
- data/lib/checkoff/internal/asana_event_enrichment.rb +1 -0
- data/lib/checkoff/internal/asana_event_filter.rb +1 -0
- data/lib/checkoff/internal/config_loader.rb +1 -0
- data/lib/checkoff/internal/logging.rb +6 -5
- data/lib/checkoff/internal/project_hashes.rb +1 -0
- data/lib/checkoff/internal/project_selector_evaluator.rb +2 -1
- data/lib/checkoff/internal/project_timing.rb +1 -0
- data/lib/checkoff/internal/search_url/custom_field_param_converter.rb +1 -0
- data/lib/checkoff/internal/search_url/custom_field_variant.rb +1 -0
- data/lib/checkoff/internal/search_url/date_param_converter.rb +1 -0
- data/lib/checkoff/internal/search_url/parser.rb +1 -0
- data/lib/checkoff/internal/search_url/results_merger.rb +1 -0
- data/lib/checkoff/internal/search_url/simple_param_converter.rb +1 -0
- data/lib/checkoff/internal/search_url.rb +1 -0
- data/lib/checkoff/internal/section_selector_evaluator.rb +2 -1
- data/lib/checkoff/internal/selector_classes/common/function_evaluator.rb +1 -0
- data/lib/checkoff/internal/selector_classes/common.rb +1 -0
- data/lib/checkoff/internal/selector_classes/function_evaluator.rb +1 -0
- data/lib/checkoff/internal/selector_classes/project/function_evaluator.rb +1 -0
- data/lib/checkoff/internal/selector_classes/project.rb +1 -0
- data/lib/checkoff/internal/selector_classes/section/function_evaluator.rb +1 -0
- data/lib/checkoff/internal/selector_classes/section.rb +1 -0
- data/lib/checkoff/internal/selector_classes/task/function_evaluator.rb +1 -0
- data/lib/checkoff/internal/selector_classes/task.rb +1 -0
- data/lib/checkoff/internal/selector_evaluator.rb +5 -4
- data/lib/checkoff/internal/task_hashes.rb +1 -0
- data/lib/checkoff/internal/task_selector_evaluator.rb +2 -1
- data/lib/checkoff/internal/task_timing.rb +1 -0
- data/lib/checkoff/internal/thread_local.rb +1 -0
- data/lib/checkoff/monkeypatches/resource_marshalling.rb +1 -0
- data/lib/checkoff/my_tasks.rb +1 -0
- data/lib/checkoff/portfolios.rb +1 -0
- data/lib/checkoff/project_selectors.rb +1 -0
- data/lib/checkoff/projects.rb +2 -0
- data/lib/checkoff/resources.rb +1 -0
- data/lib/checkoff/section_selectors.rb +1 -0
- data/lib/checkoff/sections.rb +1 -0
- data/lib/checkoff/subtasks.rb +1 -0
- data/lib/checkoff/tags.rb +1 -0
- data/lib/checkoff/task_searches.rb +1 -0
- data/lib/checkoff/task_selectors.rb +1 -0
- data/lib/checkoff/tasks.rb +1 -1
- data/lib/checkoff/timelines.rb +1 -0
- data/lib/checkoff/timing.rb +1 -0
- data/lib/checkoff/version.rb +2 -1
- data/lib/checkoff/workspaces.rb +1 -0
- data/lib/checkoff.rb +1 -0
- data/sorbet/rbi/gems/asana@0.10.6-ab9393136d9ca59b75e42a661fdddc1c65c8f7c3.rbi +1 -1
- data/sorbet/rbi/gems/ast@2.4.2.rbi +1 -1
- data/sorbet/rbi/gems/backport@1.2.0.rbi +1 -1
- data/sorbet/rbi/gems/base64@0.2.0.rbi +1 -1
- data/sorbet/rbi/gems/benchmark@0.4.0.rbi +1 -1
- data/sorbet/rbi/gems/bigdecimal@3.1.5.rbi +1 -1
- data/sorbet/rbi/gems/cache@0.4.1.rbi +1 -1
- data/sorbet/rbi/gems/cache_method@0.2.7.rbi +1 -1
- data/sorbet/rbi/gems/chef-utils@18.3.0.rbi +1 -1
- data/sorbet/rbi/gems/childprocess@5.1.0.rbi +1 -1
- data/sorbet/rbi/gems/commander@4.6.0.rbi +9 -0
- data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +1 -1
- data/sorbet/rbi/gems/crack@0.4.5.rbi +1 -1
- data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +1 -1
- data/sorbet/rbi/gems/erubi@1.13.0.rbi +1 -1
- data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +1 -1
- data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +1 -1
- data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +1 -1
- data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +1 -1
- data/sorbet/rbi/gems/faraday_middleware-multi_json@0.0.6.rbi +1 -1
- data/sorbet/rbi/gems/gli@2.22.0.rbi +1 -1
- data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +1 -1
- data/sorbet/rbi/gems/highline@2.0.3.rbi +9 -0
- data/sorbet/rbi/gems/jaro_winkler@1.6.0.rbi +1 -1
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +1 -1
- data/sorbet/rbi/gems/mdl@0.13.0.rbi +1 -1
- data/sorbet/rbi/gems/minitest-profile@0.0.2.rbi +1 -1
- data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +1 -1
- data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +1 -1
- data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +1 -1
- data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +1 -1
- data/sorbet/rbi/gems/mocha@2.1.0.rbi +1 -1
- data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +1 -1
- data/sorbet/rbi/gems/parallel@1.23.0.rbi +1 -1
- data/sorbet/rbi/gems/parlour@5.0.0.rbi +3007 -0
- data/sorbet/rbi/gems/parser@3.2.2.4.rbi +1 -1
- data/sorbet/rbi/gems/punchlist@1.3.2.rbi +1 -1
- data/sorbet/rbi/gems/racc@1.8.1.rbi +1 -1
- data/sorbet/rbi/gems/rbi@0.2.1.rbi +1 -1
- data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +1 -1
- data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +66 -0
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +1 -1
- data/sorbet/rbi/gems/securerandom@0.4.0.rbi +1 -1
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +1 -1
- data/sorbet/rbi/gems/simplecov-lcov@0.8.0.rbi +1 -1
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +1 -1
- data/sorbet/rbi/gems/sord@5.1.0.rbi +820 -0
- data/sorbet/rbi/gems/source_finder@3.2.1.rbi +1 -1
- data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +1 -1
- data/sorbet/rbi/todo.rbi +1 -1
- data/sorbet/tapioca/require.rb +1 -1
- metadata +6 -1
@@ -0,0 +1,3007 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `parlour` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem parlour`.
|
6
|
+
|
7
|
+
|
8
|
+
# typed: strong
|
9
|
+
module Kernel; end
|
10
|
+
|
11
|
+
# source://parlour//lib/parlour/version.rb#2
|
12
|
+
module Parlour; end
|
13
|
+
|
14
|
+
# Responsible for resolving conflicts (that is, multiple definitions with the
|
15
|
+
# same name) between objects defined in the same namespace.
|
16
|
+
#
|
17
|
+
# source://parlour//lib/parlour/conflict_resolver.rb#7
|
18
|
+
class Parlour::ConflictResolver
|
19
|
+
extend T::Sig
|
20
|
+
|
21
|
+
# source://parlour//lib/parlour/conflict_resolver.rb#43
|
22
|
+
sig do
|
23
|
+
params(
|
24
|
+
namespace: ::Parlour::RbiGenerator::Namespace,
|
25
|
+
resolver: T.proc.params(desc: ::String, choices: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T.nilable(::Parlour::RbiGenerator::RbiObject))
|
26
|
+
).void
|
27
|
+
end
|
28
|
+
def resolve_conflicts(namespace, &resolver); end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
# source://parlour//lib/parlour/conflict_resolver.rb#240
|
33
|
+
sig { params(arr: T::Array[T.untyped]).returns(T::Boolean) }
|
34
|
+
def all_eql?(arr); end
|
35
|
+
|
36
|
+
# source://parlour//lib/parlour/conflict_resolver.rb#251
|
37
|
+
sig { params(namespace: ::Parlour::RbiGenerator::Namespace, name: T.nilable(::String)).void }
|
38
|
+
def deduplicate_mixins_of_name(namespace, name); end
|
39
|
+
|
40
|
+
# source://parlour//lib/parlour/conflict_resolver.rb#213
|
41
|
+
sig { params(arr: T::Array[T.untyped]).returns(T.nilable(::Symbol)) }
|
42
|
+
def merge_strategy(arr); end
|
43
|
+
end
|
44
|
+
|
45
|
+
# source://parlour//lib/parlour/conversion/converter.rb#5
|
46
|
+
module Parlour::Conversion; end
|
47
|
+
|
48
|
+
# An abstract class which converts between the node trees of two type
|
49
|
+
# systems.
|
50
|
+
#
|
51
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
52
|
+
#
|
53
|
+
# source://parlour//lib/parlour/conversion/converter.rb#8
|
54
|
+
class Parlour::Conversion::Converter
|
55
|
+
extend T::Sig
|
56
|
+
extend T::Helpers
|
57
|
+
|
58
|
+
abstract!
|
59
|
+
|
60
|
+
# @return [Converter] a new instance of Converter
|
61
|
+
#
|
62
|
+
# source://parlour//lib/parlour/conversion/converter.rb#13
|
63
|
+
sig { void }
|
64
|
+
def initialize; end
|
65
|
+
|
66
|
+
# source://parlour//lib/parlour/conversion/converter.rb#21
|
67
|
+
sig { params(msg: ::String, node: ::Parlour::RbiGenerator::RbiObject).void }
|
68
|
+
def add_warning(msg, node); end
|
69
|
+
|
70
|
+
# source://parlour//lib/parlour/conversion/converter.rb#18
|
71
|
+
sig { returns(T::Array[[::String, ::Parlour::TypedObject]]) }
|
72
|
+
def warnings; end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Converts RBI types to RBS types.
|
76
|
+
#
|
77
|
+
# source://parlour//lib/parlour/conversion/rbi_to_rbs.rb#5
|
78
|
+
class Parlour::Conversion::RbiToRbs < ::Parlour::Conversion::Converter
|
79
|
+
extend T::Sig
|
80
|
+
|
81
|
+
# source://parlour//lib/parlour/conversion/rbi_to_rbs.rb#9
|
82
|
+
sig { params(rbs_gen: ::Parlour::RbsGenerator).void }
|
83
|
+
def initialize(rbs_gen); end
|
84
|
+
|
85
|
+
# source://parlour//lib/parlour/conversion/rbi_to_rbs.rb#18
|
86
|
+
sig { params(from: ::Parlour::RbiGenerator::Namespace, to: ::Parlour::RbsGenerator::Namespace).void }
|
87
|
+
def convert_all(from, to); end
|
88
|
+
|
89
|
+
# source://parlour//lib/parlour/conversion/rbi_to_rbs.rb#30
|
90
|
+
sig { params(node: ::Parlour::RbiGenerator::RbiObject, new_parent: ::Parlour::RbsGenerator::Namespace).void }
|
91
|
+
def convert_object(node, new_parent); end
|
92
|
+
|
93
|
+
# source://parlour//lib/parlour/conversion/rbi_to_rbs.rb#15
|
94
|
+
sig { returns(::Parlour::RbsGenerator) }
|
95
|
+
def rbs_gen; end
|
96
|
+
end
|
97
|
+
|
98
|
+
# Contains methods to enable debugging facilities for Parlour.
|
99
|
+
#
|
100
|
+
# source://parlour//lib/parlour/debugging.rb#6
|
101
|
+
module Parlour::Debugging
|
102
|
+
extend T::Sig
|
103
|
+
|
104
|
+
class << self
|
105
|
+
# Set whether debug messages should be printed.
|
106
|
+
#
|
107
|
+
# source://parlour//lib/parlour/debugging.rb#16
|
108
|
+
sig { params(value: T::Boolean).returns(T::Boolean) }
|
109
|
+
def debug_mode=(value); end
|
110
|
+
|
111
|
+
# Whether debug messages sent by {#debug_puts} should be printed.
|
112
|
+
# Defaults to true if the PARLOUR_DEBUG environment variable is set.
|
113
|
+
#
|
114
|
+
# source://parlour//lib/parlour/debugging.rb#24
|
115
|
+
sig { returns(T::Boolean) }
|
116
|
+
def debug_mode?; end
|
117
|
+
|
118
|
+
# Prints a message with a debugging prefix to STDOUT if {#debug_mode?} is
|
119
|
+
# true.
|
120
|
+
#
|
121
|
+
# source://parlour//lib/parlour/debugging.rb#36
|
122
|
+
sig { params(object: T.untyped, message: ::String).void }
|
123
|
+
def debug_puts(object, message); end
|
124
|
+
|
125
|
+
# Converts the given object into a human-readable prefix to a debug message.
|
126
|
+
# For example, passing an instance of {ConflictResolver} returns
|
127
|
+
# "conflict resolver". If the object type is unknown, this returns its class
|
128
|
+
# name.
|
129
|
+
#
|
130
|
+
# source://parlour//lib/parlour/debugging.rb#50
|
131
|
+
sig { params(object: T.untyped).returns(::String) }
|
132
|
+
def name_for_debug_caller(object); end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
# A module for generating a globally-consistent, nicely-formatted tree of
|
137
|
+
# output using Unicode block characters.
|
138
|
+
#
|
139
|
+
# source://parlour//lib/parlour/debugging.rb#66
|
140
|
+
module Parlour::Debugging::Tree
|
141
|
+
extend T::Sig
|
142
|
+
|
143
|
+
class << self
|
144
|
+
# Returns a new heading, and then decents the tree one level into it.
|
145
|
+
# (That is, future output will go under the new heading.)
|
146
|
+
#
|
147
|
+
# source://parlour//lib/parlour/debugging.rb#81
|
148
|
+
sig { params(message: ::String).returns(::String) }
|
149
|
+
def begin(message); end
|
150
|
+
|
151
|
+
# Prints the final tree element at the current level, then ascends one
|
152
|
+
# level.
|
153
|
+
#
|
154
|
+
# source://parlour//lib/parlour/debugging.rb#100
|
155
|
+
sig { params(message: ::String).returns(::String) }
|
156
|
+
def end(message); end
|
157
|
+
|
158
|
+
# Prints a new tree element at the current level.
|
159
|
+
#
|
160
|
+
# source://parlour//lib/parlour/debugging.rb#91
|
161
|
+
sig { params(message: ::String).returns(::String) }
|
162
|
+
def here(message); end
|
163
|
+
|
164
|
+
# The prefix which should be printed before anything else on this line of
|
165
|
+
# the tree, based on the current indent level.
|
166
|
+
#
|
167
|
+
# @return [String]
|
168
|
+
#
|
169
|
+
# source://parlour//lib/parlour/debugging.rb#109
|
170
|
+
sig { returns(T.untyped) }
|
171
|
+
def line_prefix; end
|
172
|
+
|
173
|
+
# The horizontal lines which should be printed between the beginning of
|
174
|
+
# the current element and its text, based on the specified number of
|
175
|
+
# spaces to use for indents.
|
176
|
+
#
|
177
|
+
# @return [String]
|
178
|
+
#
|
179
|
+
# source://parlour//lib/parlour/debugging.rb#117
|
180
|
+
sig { returns(T.untyped) }
|
181
|
+
def text_prefix; end
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
# The number of spaces to indent each layer of the tree by. Should be at
|
186
|
+
# least 1.
|
187
|
+
#
|
188
|
+
# source://parlour//lib/parlour/debugging.rb#71
|
189
|
+
Parlour::Debugging::Tree::INDENT_SPACES = T.let(T.unsafe(nil), Integer)
|
190
|
+
|
191
|
+
# source://parlour//lib/parlour/detached_rbi_generator.rb#4
|
192
|
+
class Parlour::DetachedRbiGenerator < ::Parlour::RbiGenerator
|
193
|
+
# source://parlour//lib/parlour/detached_rbi_generator.rb#16
|
194
|
+
sig { override.returns(T.nilable(::Parlour::Plugin)) }
|
195
|
+
def current_plugin; end
|
196
|
+
|
197
|
+
# source://parlour//lib/parlour/detached_rbi_generator.rb#6
|
198
|
+
sig { returns(T.untyped) }
|
199
|
+
def detached!; end
|
200
|
+
|
201
|
+
# source://parlour//lib/parlour/detached_rbi_generator.rb#11
|
202
|
+
sig { override.returns(::Parlour::Options) }
|
203
|
+
def options; end
|
204
|
+
|
205
|
+
# source://parlour//lib/parlour/detached_rbi_generator.rb#21
|
206
|
+
sig { override.params(strictness: ::String).returns(::String) }
|
207
|
+
def rbi(strictness = T.unsafe(nil)); end
|
208
|
+
end
|
209
|
+
|
210
|
+
# source://parlour//lib/parlour/detached_rbs_generator.rb#4
|
211
|
+
class Parlour::DetachedRbsGenerator < ::Parlour::RbsGenerator
|
212
|
+
# source://parlour//lib/parlour/detached_rbs_generator.rb#16
|
213
|
+
sig { override.returns(T.nilable(::Parlour::Plugin)) }
|
214
|
+
def current_plugin; end
|
215
|
+
|
216
|
+
# source://parlour//lib/parlour/detached_rbs_generator.rb#6
|
217
|
+
sig { returns(T.untyped) }
|
218
|
+
def detached!; end
|
219
|
+
|
220
|
+
# source://parlour//lib/parlour/detached_rbs_generator.rb#11
|
221
|
+
sig { override.returns(::Parlour::Options) }
|
222
|
+
def options; end
|
223
|
+
|
224
|
+
# source://parlour//lib/parlour/detached_rbs_generator.rb#21
|
225
|
+
sig { override.returns(::String) }
|
226
|
+
def rbs; end
|
227
|
+
end
|
228
|
+
|
229
|
+
# source://parlour//lib/parlour/generator.rb#3
|
230
|
+
class Parlour::Generator
|
231
|
+
extend T::Sig
|
232
|
+
|
233
|
+
# source://parlour//lib/parlour/generator.rb#15
|
234
|
+
sig { params(break_params: ::Integer, tab_size: ::Integer, sort_namespaces: T::Boolean).void }
|
235
|
+
def initialize(break_params: T.unsafe(nil), tab_size: T.unsafe(nil), sort_namespaces: T.unsafe(nil)); end
|
236
|
+
|
237
|
+
# source://parlour//lib/parlour/generator.rb#32
|
238
|
+
sig { overridable.returns(T.nilable(::Parlour::Plugin)) }
|
239
|
+
def current_plugin; end
|
240
|
+
|
241
|
+
# @return [Plugin, nil]
|
242
|
+
#
|
243
|
+
# source://parlour//lib/parlour/generator.rb#32
|
244
|
+
def current_plugin=(_arg0); end
|
245
|
+
|
246
|
+
# source://parlour//lib/parlour/generator.rb#26
|
247
|
+
sig { overridable.returns(::Parlour::Options) }
|
248
|
+
def options; end
|
249
|
+
end
|
250
|
+
|
251
|
+
# A set of immutable formatting options.
|
252
|
+
#
|
253
|
+
# source://parlour//lib/parlour/options.rb#4
|
254
|
+
class Parlour::Options
|
255
|
+
extend T::Sig
|
256
|
+
|
257
|
+
# source://parlour//lib/parlour/options.rb#19
|
258
|
+
sig { params(break_params: ::Integer, tab_size: ::Integer, sort_namespaces: T::Boolean).void }
|
259
|
+
def initialize(break_params:, tab_size:, sort_namespaces:); end
|
260
|
+
|
261
|
+
# source://parlour//lib/parlour/options.rb#43
|
262
|
+
sig { returns(::Integer) }
|
263
|
+
def break_params; end
|
264
|
+
|
265
|
+
# source://parlour//lib/parlour/options.rb#67
|
266
|
+
sig { params(level: ::Integer, str: ::String).returns(::String) }
|
267
|
+
def indented(level, str); end
|
268
|
+
|
269
|
+
# source://parlour//lib/parlour/options.rb#58
|
270
|
+
sig { returns(T::Boolean) }
|
271
|
+
def sort_namespaces; end
|
272
|
+
|
273
|
+
# source://parlour//lib/parlour/options.rb#48
|
274
|
+
sig { returns(::Integer) }
|
275
|
+
def tab_size; end
|
276
|
+
end
|
277
|
+
|
278
|
+
# source://parlour//lib/parlour/parse_error.rb#4
|
279
|
+
class Parlour::ParseError < ::StandardError
|
280
|
+
extend T::Sig
|
281
|
+
|
282
|
+
# @return [ParseError] a new instance of ParseError
|
283
|
+
#
|
284
|
+
# source://parlour//lib/parlour/parse_error.rb#13
|
285
|
+
sig { params(buffer: T.untyped, range: T.untyped).void }
|
286
|
+
def initialize(buffer, range); end
|
287
|
+
|
288
|
+
# source://parlour//lib/parlour/parse_error.rb#8
|
289
|
+
sig { returns(::Parser::Source::Buffer) }
|
290
|
+
def buffer; end
|
291
|
+
|
292
|
+
# source://parlour//lib/parlour/parse_error.rb#11
|
293
|
+
sig { returns(::Parser::Source::Range) }
|
294
|
+
def range; end
|
295
|
+
end
|
296
|
+
|
297
|
+
# The base class for user-defined RBI generation plugins.
|
298
|
+
#
|
299
|
+
# @abstract
|
300
|
+
#
|
301
|
+
# source://parlour//lib/parlour/plugin.rb#5
|
302
|
+
class Parlour::Plugin
|
303
|
+
extend T::Sig
|
304
|
+
extend T::Helpers
|
305
|
+
|
306
|
+
abstract!
|
307
|
+
|
308
|
+
# source://parlour//lib/parlour/plugin.rb#54
|
309
|
+
sig { params(options: T::Hash[T.untyped, T.untyped]).void }
|
310
|
+
def initialize(options); end
|
311
|
+
|
312
|
+
# @abstract
|
313
|
+
#
|
314
|
+
# source://parlour//lib/parlour/plugin.rb#63
|
315
|
+
sig { abstract.params(root: ::Parlour::RbiGenerator::Namespace).void }
|
316
|
+
def generate(root); end
|
317
|
+
|
318
|
+
# source://parlour//lib/parlour/plugin.rb#70
|
319
|
+
sig { returns(T.nilable(::String)) }
|
320
|
+
def strictness; end
|
321
|
+
|
322
|
+
# @return [String, nil]
|
323
|
+
#
|
324
|
+
# source://parlour//lib/parlour/plugin.rb#70
|
325
|
+
def strictness=(_arg0); end
|
326
|
+
|
327
|
+
class << self
|
328
|
+
# source://parlour//lib/parlour/plugin.rb#27
|
329
|
+
sig { params(new_plugin: T.class_of(Parlour::Plugin)).void }
|
330
|
+
def inherited(new_plugin); end
|
331
|
+
|
332
|
+
# source://parlour//lib/parlour/plugin.rb#17
|
333
|
+
sig { returns(T::Hash[::String, T.class_of(Parlour::Plugin)]) }
|
334
|
+
def registered_plugins; end
|
335
|
+
|
336
|
+
# source://parlour//lib/parlour/plugin.rb#40
|
337
|
+
sig do
|
338
|
+
params(
|
339
|
+
plugins: T::Array[::Parlour::Plugin],
|
340
|
+
generator: ::Parlour::RbiGenerator,
|
341
|
+
allow_failure: T::Boolean
|
342
|
+
).void
|
343
|
+
end
|
344
|
+
def run_plugins(plugins, generator, allow_failure: T.unsafe(nil)); end
|
345
|
+
end
|
346
|
+
end
|
347
|
+
|
348
|
+
# The RBI generator.
|
349
|
+
#
|
350
|
+
# source://parlour//lib/parlour/rbi_generator/parameter.rb#5
|
351
|
+
class Parlour::RbiGenerator < ::Parlour::Generator
|
352
|
+
# @return [RbiGenerator] a new instance of RbiGenerator
|
353
|
+
#
|
354
|
+
# source://parlour//lib/parlour/rbi_generator.rb#9
|
355
|
+
sig { params(hash: T.untyped).void }
|
356
|
+
def initialize(**hash); end
|
357
|
+
|
358
|
+
# source://parlour//lib/parlour/rbi_generator.rb#23
|
359
|
+
sig { overridable.params(strictness: ::String).returns(::String) }
|
360
|
+
def rbi(strictness = T.unsafe(nil)); end
|
361
|
+
|
362
|
+
# source://parlour//lib/parlour/rbi_generator.rb#17
|
363
|
+
sig { overridable.returns(::Parlour::RbiGenerator::Namespace) }
|
364
|
+
def root; end
|
365
|
+
end
|
366
|
+
|
367
|
+
# Represents miscellaneous Ruby code.
|
368
|
+
#
|
369
|
+
# source://parlour//lib/parlour/rbi_generator/arbitrary.rb#5
|
370
|
+
class Parlour::RbiGenerator::Arbitrary < ::Parlour::RbiGenerator::RbiObject
|
371
|
+
# source://parlour//lib/parlour/rbi_generator/arbitrary.rb#17
|
372
|
+
sig do
|
373
|
+
params(
|
374
|
+
generator: ::Parlour::Generator,
|
375
|
+
code: ::String,
|
376
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Arbitrary).void)
|
377
|
+
).void
|
378
|
+
end
|
379
|
+
def initialize(generator, code: T.unsafe(nil), &block); end
|
380
|
+
|
381
|
+
# source://parlour//lib/parlour/rbi_generator/arbitrary.rb#33
|
382
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
383
|
+
def ==(other); end
|
384
|
+
|
385
|
+
# source://parlour//lib/parlour/rbi_generator/arbitrary.rb#25
|
386
|
+
sig { returns(::String) }
|
387
|
+
def code; end
|
388
|
+
|
389
|
+
# @return [String]
|
390
|
+
#
|
391
|
+
# source://parlour//lib/parlour/rbi_generator/arbitrary.rb#25
|
392
|
+
def code=(_arg0); end
|
393
|
+
|
394
|
+
# source://parlour//lib/parlour/rbi_generator/arbitrary.rb#87
|
395
|
+
sig { override.returns(::String) }
|
396
|
+
def describe; end
|
397
|
+
|
398
|
+
# source://parlour//lib/parlour/rbi_generator/arbitrary.rb#92
|
399
|
+
sig { override.void }
|
400
|
+
def generalize_from_rbi!; end
|
401
|
+
|
402
|
+
# source://parlour//lib/parlour/rbi_generator/arbitrary.rb#48
|
403
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
404
|
+
def generate_rbi(indent_level, options); end
|
405
|
+
|
406
|
+
# source://parlour//lib/parlour/rbi_generator/arbitrary.rb#79
|
407
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void }
|
408
|
+
def merge_into_self(others); end
|
409
|
+
|
410
|
+
# source://parlour//lib/parlour/rbi_generator/arbitrary.rb#63
|
411
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
412
|
+
def mergeable?(others); end
|
413
|
+
end
|
414
|
+
|
415
|
+
# Represents an attribute reader, writer or accessor.
|
416
|
+
#
|
417
|
+
# source://parlour//lib/parlour/rbi_generator/attribute.rb#5
|
418
|
+
class Parlour::RbiGenerator::Attribute < ::Parlour::RbiGenerator::Method
|
419
|
+
# source://parlour//lib/parlour/rbi_generator/attribute.rb#28
|
420
|
+
sig do
|
421
|
+
params(
|
422
|
+
generator: ::Parlour::Generator,
|
423
|
+
name: ::String,
|
424
|
+
kind: ::Symbol,
|
425
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
426
|
+
class_attribute: T::Boolean,
|
427
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Attribute).void)
|
428
|
+
).void
|
429
|
+
end
|
430
|
+
def initialize(generator, name, kind, type, class_attribute: T.unsafe(nil), &block); end
|
431
|
+
|
432
|
+
# source://parlour//lib/parlour/rbi_generator/attribute.rb#68
|
433
|
+
sig { override.params(other: ::Object).returns(T::Boolean) }
|
434
|
+
def ==(other); end
|
435
|
+
|
436
|
+
# source://parlour//lib/parlour/rbi_generator/attribute.rb#56
|
437
|
+
sig { returns(T::Boolean) }
|
438
|
+
def class_attribute; end
|
439
|
+
|
440
|
+
# source://parlour//lib/parlour/rbi_generator/attribute.rb#77
|
441
|
+
sig { override.void }
|
442
|
+
def generalize_from_rbi!; end
|
443
|
+
|
444
|
+
# source://parlour//lib/parlour/rbi_generator/attribute.rb#52
|
445
|
+
sig { returns(::Symbol) }
|
446
|
+
def kind; end
|
447
|
+
|
448
|
+
# source://parlour//lib/parlour/rbi_generator/attribute.rb#60
|
449
|
+
sig { returns(T.any(::Parlour::Types::Type, ::String)) }
|
450
|
+
def type; end
|
451
|
+
|
452
|
+
private
|
453
|
+
|
454
|
+
# source://parlour//lib/parlour/rbi_generator/attribute.rb#94
|
455
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
456
|
+
def generate_definition(indent_level, options); end
|
457
|
+
end
|
458
|
+
|
459
|
+
# Represents a class definition.
|
460
|
+
#
|
461
|
+
# source://parlour//lib/parlour/rbi_generator/class_namespace.rb#5
|
462
|
+
class Parlour::RbiGenerator::ClassNamespace < ::Parlour::RbiGenerator::Namespace
|
463
|
+
extend T::Sig
|
464
|
+
|
465
|
+
# source://parlour//lib/parlour/rbi_generator/class_namespace.rb#31
|
466
|
+
sig do
|
467
|
+
params(
|
468
|
+
generator: ::Parlour::Generator,
|
469
|
+
name: ::String,
|
470
|
+
final: T::Boolean,
|
471
|
+
sealed: T::Boolean,
|
472
|
+
superclass: T.nilable(::String),
|
473
|
+
abstract: T::Boolean,
|
474
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::ClassNamespace).void)
|
475
|
+
).void
|
476
|
+
end
|
477
|
+
def initialize(generator, name, final, sealed, superclass, abstract, &block); end
|
478
|
+
|
479
|
+
# source://parlour//lib/parlour/rbi_generator/class_namespace.rb#68
|
480
|
+
sig { returns(T::Boolean) }
|
481
|
+
def abstract; end
|
482
|
+
|
483
|
+
# source://parlour//lib/parlour/rbi_generator/class_namespace.rb#116
|
484
|
+
sig { override.returns(::String) }
|
485
|
+
def describe; end
|
486
|
+
|
487
|
+
# source://parlour//lib/parlour/rbi_generator/class_namespace.rb#123
|
488
|
+
sig { override.void }
|
489
|
+
def generalize_from_rbi!; end
|
490
|
+
|
491
|
+
# source://parlour//lib/parlour/rbi_generator/class_namespace.rb#48
|
492
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
493
|
+
def generate_rbi(indent_level, options); end
|
494
|
+
|
495
|
+
# source://parlour//lib/parlour/rbi_generator/class_namespace.rb#102
|
496
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void }
|
497
|
+
def merge_into_self(others); end
|
498
|
+
|
499
|
+
# source://parlour//lib/parlour/rbi_generator/class_namespace.rb#82
|
500
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
501
|
+
def mergeable?(others); end
|
502
|
+
|
503
|
+
# source://parlour//lib/parlour/rbi_generator/class_namespace.rb#63
|
504
|
+
sig { returns(T.nilable(::String)) }
|
505
|
+
def superclass; end
|
506
|
+
end
|
507
|
+
|
508
|
+
# Represents a constant definition.
|
509
|
+
#
|
510
|
+
# source://parlour//lib/parlour/rbi_generator/constant.rb#5
|
511
|
+
class Parlour::RbiGenerator::Constant < ::Parlour::RbiGenerator::RbiObject
|
512
|
+
# source://parlour//lib/parlour/rbi_generator/constant.rb#21
|
513
|
+
sig do
|
514
|
+
params(
|
515
|
+
generator: ::Parlour::Generator,
|
516
|
+
name: ::String,
|
517
|
+
value: T.any(::Parlour::Types::Type, ::String),
|
518
|
+
eigen_constant: T::Boolean,
|
519
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Constant).void)
|
520
|
+
).void
|
521
|
+
end
|
522
|
+
def initialize(generator, name: T.unsafe(nil), value: T.unsafe(nil), eigen_constant: T.unsafe(nil), &block); end
|
523
|
+
|
524
|
+
# source://parlour//lib/parlour/rbi_generator/constant.rb#42
|
525
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
526
|
+
def ==(other); end
|
527
|
+
|
528
|
+
# source://parlour//lib/parlour/rbi_generator/constant.rb#102
|
529
|
+
sig { override.returns(::String) }
|
530
|
+
def describe; end
|
531
|
+
|
532
|
+
# @return [Boolean] Whether this constant is defined on the eigenclass
|
533
|
+
# of the current namespace.
|
534
|
+
#
|
535
|
+
# source://parlour//lib/parlour/rbi_generator/constant.rb#34
|
536
|
+
def eigen_constant; end
|
537
|
+
|
538
|
+
# source://parlour//lib/parlour/rbi_generator/constant.rb#107
|
539
|
+
sig { override.void }
|
540
|
+
def generalize_from_rbi!; end
|
541
|
+
|
542
|
+
# source://parlour//lib/parlour/rbi_generator/constant.rb#58
|
543
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
544
|
+
def generate_rbi(indent_level, options); end
|
545
|
+
|
546
|
+
# source://parlour//lib/parlour/rbi_generator/constant.rb#94
|
547
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void }
|
548
|
+
def merge_into_self(others); end
|
549
|
+
|
550
|
+
# source://parlour//lib/parlour/rbi_generator/constant.rb#77
|
551
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
552
|
+
def mergeable?(others); end
|
553
|
+
|
554
|
+
# source://parlour//lib/parlour/rbi_generator/constant.rb#30
|
555
|
+
sig { returns(T.any(::Parlour::Types::Type, ::String)) }
|
556
|
+
def value; end
|
557
|
+
end
|
558
|
+
|
559
|
+
# Represents an enum definition; that is, a class with an +enum+ call.
|
560
|
+
#
|
561
|
+
# source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#5
|
562
|
+
class Parlour::RbiGenerator::EnumClassNamespace < ::Parlour::RbiGenerator::ClassNamespace
|
563
|
+
extend T::Sig
|
564
|
+
|
565
|
+
# source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#30
|
566
|
+
sig do
|
567
|
+
params(
|
568
|
+
generator: ::Parlour::Generator,
|
569
|
+
name: ::String,
|
570
|
+
final: T::Boolean,
|
571
|
+
sealed: T::Boolean,
|
572
|
+
enums: T::Array[T.any(::String, [::String, ::String])],
|
573
|
+
abstract: T::Boolean,
|
574
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::EnumClassNamespace).void)
|
575
|
+
).void
|
576
|
+
end
|
577
|
+
def initialize(generator, name, final, sealed, enums, abstract, &block); end
|
578
|
+
|
579
|
+
# source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#38
|
580
|
+
sig { returns(T::Array[T.any(::String, [::String, ::String])]) }
|
581
|
+
def enums; end
|
582
|
+
|
583
|
+
# source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#114
|
584
|
+
sig { override.void }
|
585
|
+
def generalize_from_rbi!; end
|
586
|
+
|
587
|
+
# source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#52
|
588
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
589
|
+
def generate_body(indent_level, options); end
|
590
|
+
|
591
|
+
# source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#102
|
592
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void }
|
593
|
+
def merge_into_self(others); end
|
594
|
+
|
595
|
+
# source://parlour//lib/parlour/rbi_generator/enum_class_namespace.rb#84
|
596
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
597
|
+
def mergeable?(others); end
|
598
|
+
end
|
599
|
+
|
600
|
+
# Represents an +extend+ call.
|
601
|
+
#
|
602
|
+
# source://parlour//lib/parlour/rbi_generator/extend.rb#5
|
603
|
+
class Parlour::RbiGenerator::Extend < ::Parlour::RbiGenerator::RbiObject
|
604
|
+
# source://parlour//lib/parlour/rbi_generator/extend.rb#16
|
605
|
+
sig do
|
606
|
+
params(
|
607
|
+
generator: ::Parlour::Generator,
|
608
|
+
name: ::String,
|
609
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Extend).void)
|
610
|
+
).void
|
611
|
+
end
|
612
|
+
def initialize(generator, name: T.unsafe(nil), &block); end
|
613
|
+
|
614
|
+
# source://parlour//lib/parlour/rbi_generator/extend.rb#27
|
615
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
616
|
+
def ==(other); end
|
617
|
+
|
618
|
+
# source://parlour//lib/parlour/rbi_generator/extend.rb#82
|
619
|
+
sig { override.returns(::String) }
|
620
|
+
def describe; end
|
621
|
+
|
622
|
+
# source://parlour//lib/parlour/rbi_generator/extend.rb#87
|
623
|
+
sig { override.void }
|
624
|
+
def generalize_from_rbi!; end
|
625
|
+
|
626
|
+
# source://parlour//lib/parlour/rbi_generator/extend.rb#42
|
627
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
628
|
+
def generate_rbi(indent_level, options); end
|
629
|
+
|
630
|
+
# source://parlour//lib/parlour/rbi_generator/extend.rb#74
|
631
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void }
|
632
|
+
def merge_into_self(others); end
|
633
|
+
|
634
|
+
# source://parlour//lib/parlour/rbi_generator/extend.rb#57
|
635
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
636
|
+
def mergeable?(others); end
|
637
|
+
end
|
638
|
+
|
639
|
+
# Represents an +include+ call.
|
640
|
+
#
|
641
|
+
# source://parlour//lib/parlour/rbi_generator/include.rb#5
|
642
|
+
class Parlour::RbiGenerator::Include < ::Parlour::RbiGenerator::RbiObject
|
643
|
+
# source://parlour//lib/parlour/rbi_generator/include.rb#16
|
644
|
+
sig do
|
645
|
+
params(
|
646
|
+
generator: ::Parlour::Generator,
|
647
|
+
name: ::String,
|
648
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Include).void)
|
649
|
+
).void
|
650
|
+
end
|
651
|
+
def initialize(generator, name: T.unsafe(nil), &block); end
|
652
|
+
|
653
|
+
# source://parlour//lib/parlour/rbi_generator/include.rb#27
|
654
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
655
|
+
def ==(other); end
|
656
|
+
|
657
|
+
# source://parlour//lib/parlour/rbi_generator/include.rb#82
|
658
|
+
sig { override.returns(::String) }
|
659
|
+
def describe; end
|
660
|
+
|
661
|
+
# source://parlour//lib/parlour/rbi_generator/include.rb#87
|
662
|
+
sig { override.void }
|
663
|
+
def generalize_from_rbi!; end
|
664
|
+
|
665
|
+
# source://parlour//lib/parlour/rbi_generator/include.rb#42
|
666
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
667
|
+
def generate_rbi(indent_level, options); end
|
668
|
+
|
669
|
+
# source://parlour//lib/parlour/rbi_generator/include.rb#74
|
670
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void }
|
671
|
+
def merge_into_self(others); end
|
672
|
+
|
673
|
+
# source://parlour//lib/parlour/rbi_generator/include.rb#57
|
674
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
675
|
+
def mergeable?(others); end
|
676
|
+
end
|
677
|
+
|
678
|
+
# Represents a method definition.
|
679
|
+
#
|
680
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#5
|
681
|
+
class Parlour::RbiGenerator::Method < ::Parlour::RbiGenerator::RbiObject
|
682
|
+
extend T::Sig
|
683
|
+
|
684
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#45
|
685
|
+
sig do
|
686
|
+
params(
|
687
|
+
generator: ::Parlour::Generator,
|
688
|
+
name: ::String,
|
689
|
+
parameters: T::Array[::Parlour::RbiGenerator::Parameter],
|
690
|
+
return_type: T.nilable(T.any(::Parlour::Types::Type, ::String)),
|
691
|
+
abstract: T::Boolean,
|
692
|
+
implementation: T::Boolean,
|
693
|
+
override: T::Boolean,
|
694
|
+
overridable: T::Boolean,
|
695
|
+
class_method: T::Boolean,
|
696
|
+
final: T::Boolean,
|
697
|
+
type_parameters: T.nilable(T::Array[::Symbol]),
|
698
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Method).void)
|
699
|
+
).void
|
700
|
+
end
|
701
|
+
def initialize(generator, name, parameters, return_type = T.unsafe(nil), abstract: T.unsafe(nil), implementation: T.unsafe(nil), override: T.unsafe(nil), overridable: T.unsafe(nil), class_method: T.unsafe(nil), final: T.unsafe(nil), type_parameters: T.unsafe(nil), &block); end
|
702
|
+
|
703
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#65
|
704
|
+
sig { overridable.params(other: ::Object).returns(T::Boolean) }
|
705
|
+
def ==(other); end
|
706
|
+
|
707
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#92
|
708
|
+
sig { returns(T::Boolean) }
|
709
|
+
def abstract; end
|
710
|
+
|
711
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#117
|
712
|
+
sig { returns(T::Boolean) }
|
713
|
+
def class_method; end
|
714
|
+
|
715
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#213
|
716
|
+
sig { override.returns(::String) }
|
717
|
+
def describe; end
|
718
|
+
|
719
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#122
|
720
|
+
sig { returns(T::Boolean) }
|
721
|
+
def final; end
|
722
|
+
|
723
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#220
|
724
|
+
sig { override.void }
|
725
|
+
def generalize_from_rbi!; end
|
726
|
+
|
727
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#140
|
728
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
729
|
+
def generate_rbi(indent_level, options); end
|
730
|
+
|
731
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#100
|
732
|
+
sig { returns(T::Boolean) }
|
733
|
+
def implementation; end
|
734
|
+
|
735
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#205
|
736
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void }
|
737
|
+
def merge_into_self(others); end
|
738
|
+
|
739
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#188
|
740
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
741
|
+
def mergeable?(others); end
|
742
|
+
|
743
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#111
|
744
|
+
sig { returns(T::Boolean) }
|
745
|
+
def overridable; end
|
746
|
+
|
747
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#106
|
748
|
+
sig { returns(T::Boolean) }
|
749
|
+
def override; end
|
750
|
+
|
751
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#82
|
752
|
+
sig { returns(T::Array[::Parlour::RbiGenerator::Parameter]) }
|
753
|
+
def parameters; end
|
754
|
+
|
755
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#87
|
756
|
+
sig { returns(T.nilable(T.any(::Parlour::Types::Type, ::String))) }
|
757
|
+
def return_type; end
|
758
|
+
|
759
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#127
|
760
|
+
sig { returns(T::Array[::Symbol]) }
|
761
|
+
def type_parameters; end
|
762
|
+
|
763
|
+
private
|
764
|
+
|
765
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#239
|
766
|
+
sig { overridable.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
767
|
+
def generate_definition(indent_level, options); end
|
768
|
+
|
769
|
+
# source://parlour//lib/parlour/rbi_generator/method.rb#256
|
770
|
+
sig { returns(::String) }
|
771
|
+
def qualifiers; end
|
772
|
+
end
|
773
|
+
|
774
|
+
# Represents a module definition.
|
775
|
+
#
|
776
|
+
# source://parlour//lib/parlour/rbi_generator/module_namespace.rb#5
|
777
|
+
class Parlour::RbiGenerator::ModuleNamespace < ::Parlour::RbiGenerator::Namespace
|
778
|
+
extend T::Sig
|
779
|
+
|
780
|
+
# source://parlour//lib/parlour/rbi_generator/module_namespace.rb#31
|
781
|
+
sig do
|
782
|
+
params(
|
783
|
+
generator: ::Parlour::Generator,
|
784
|
+
name: ::String,
|
785
|
+
final: T::Boolean,
|
786
|
+
sealed: T::Boolean,
|
787
|
+
interface: T::Boolean,
|
788
|
+
abstract: T::Boolean,
|
789
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::ClassNamespace).void)
|
790
|
+
).void
|
791
|
+
end
|
792
|
+
def initialize(generator, name, final, sealed, interface, abstract, &block); end
|
793
|
+
|
794
|
+
# source://parlour//lib/parlour/rbi_generator/module_namespace.rb#66
|
795
|
+
sig { returns(T::Boolean) }
|
796
|
+
def abstract; end
|
797
|
+
|
798
|
+
# source://parlour//lib/parlour/rbi_generator/module_namespace.rb#106
|
799
|
+
sig { override.returns(::String) }
|
800
|
+
def describe; end
|
801
|
+
|
802
|
+
# source://parlour//lib/parlour/rbi_generator/module_namespace.rb#113
|
803
|
+
sig { override.void }
|
804
|
+
def generalize_from_rbi!; end
|
805
|
+
|
806
|
+
# source://parlour//lib/parlour/rbi_generator/module_namespace.rb#49
|
807
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
808
|
+
def generate_rbi(indent_level, options); end
|
809
|
+
|
810
|
+
# source://parlour//lib/parlour/rbi_generator/module_namespace.rb#61
|
811
|
+
sig { returns(T::Boolean) }
|
812
|
+
def interface; end
|
813
|
+
|
814
|
+
# source://parlour//lib/parlour/rbi_generator/module_namespace.rb#99
|
815
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void }
|
816
|
+
def merge_into_self(others); end
|
817
|
+
|
818
|
+
# source://parlour//lib/parlour/rbi_generator/module_namespace.rb#80
|
819
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
820
|
+
def mergeable?(others); end
|
821
|
+
end
|
822
|
+
|
823
|
+
# A generic namespace. This shouldn't be used, except as the type of
|
824
|
+
# {RbiGenerator#root}.
|
825
|
+
#
|
826
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#6
|
827
|
+
class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject
|
828
|
+
extend T::Sig
|
829
|
+
|
830
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#44
|
831
|
+
sig do
|
832
|
+
params(
|
833
|
+
generator: ::Parlour::Generator,
|
834
|
+
name: T.nilable(::String),
|
835
|
+
final: T::Boolean,
|
836
|
+
sealed: T::Boolean,
|
837
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Namespace).void)
|
838
|
+
).void
|
839
|
+
end
|
840
|
+
def initialize(generator, name = T.unsafe(nil), final = T.unsafe(nil), sealed = T.unsafe(nil), &block); end
|
841
|
+
|
842
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#150
|
843
|
+
sig { params(comment: T.any(::String, T::Array[::String])).void }
|
844
|
+
def add_comment_to_next_child(comment); end
|
845
|
+
|
846
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#91
|
847
|
+
sig { returns(T::Array[::Parlour::RbiGenerator::TypeAlias]) }
|
848
|
+
def aliases; end
|
849
|
+
|
850
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#66
|
851
|
+
sig { returns(T::Array[::Parlour::RbiGenerator::RbiObject]) }
|
852
|
+
def children; end
|
853
|
+
|
854
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#102
|
855
|
+
sig { returns(T::Array[::Parlour::RbiGenerator::Constant]) }
|
856
|
+
def constants; end
|
857
|
+
|
858
|
+
# Creates a new arbitrary code section.
|
859
|
+
# You should rarely have to use this!
|
860
|
+
#
|
861
|
+
# @param code [String] The code to insert.
|
862
|
+
# @param block A block which the new instance yields itself to.
|
863
|
+
# @return [RbiGenerator::Arbitrary]
|
864
|
+
#
|
865
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#475
|
866
|
+
sig { params(code: T.untyped, block: T.untyped).returns(T.untyped) }
|
867
|
+
def create_arbitrary(code:, &block); end
|
868
|
+
|
869
|
+
# @param name [String]
|
870
|
+
# @param kind [Symbol]
|
871
|
+
# @param type [Types::TypeLike]
|
872
|
+
# @param class_attribute [Boolean]
|
873
|
+
# @param block [T.proc.params(x: Attribute).void, nil]
|
874
|
+
# @return [Attribute]
|
875
|
+
#
|
876
|
+
# source://sorbet-runtime/0.5.11690/lib/types/private/methods/_methods.rb#257
|
877
|
+
def create_attr(*args, **_arg1, &blk); end
|
878
|
+
|
879
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#465
|
880
|
+
sig do
|
881
|
+
params(
|
882
|
+
name: ::String,
|
883
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
884
|
+
class_attribute: T::Boolean,
|
885
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Attribute).void)
|
886
|
+
).returns(::Parlour::RbiGenerator::Attribute)
|
887
|
+
end
|
888
|
+
def create_attr_accessor(name, type:, class_attribute: T.unsafe(nil), &block); end
|
889
|
+
|
890
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#423
|
891
|
+
sig do
|
892
|
+
params(
|
893
|
+
name: ::String,
|
894
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
895
|
+
class_attribute: T::Boolean,
|
896
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Attribute).void)
|
897
|
+
).returns(::Parlour::RbiGenerator::Attribute)
|
898
|
+
end
|
899
|
+
def create_attr_reader(name, type:, class_attribute: T.unsafe(nil), &block); end
|
900
|
+
|
901
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#444
|
902
|
+
sig do
|
903
|
+
params(
|
904
|
+
name: ::String,
|
905
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
906
|
+
class_attribute: T::Boolean,
|
907
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Attribute).void)
|
908
|
+
).returns(::Parlour::RbiGenerator::Attribute)
|
909
|
+
end
|
910
|
+
def create_attr_writer(name, type:, class_attribute: T.unsafe(nil), &block); end
|
911
|
+
|
912
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#391
|
913
|
+
sig do
|
914
|
+
params(
|
915
|
+
name: ::String,
|
916
|
+
kind: ::Symbol,
|
917
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
918
|
+
class_attribute: T::Boolean,
|
919
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Attribute).void)
|
920
|
+
).returns(::Parlour::RbiGenerator::Attribute)
|
921
|
+
end
|
922
|
+
def create_attribute(name, kind:, type:, class_attribute: T.unsafe(nil), &block); end
|
923
|
+
|
924
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#186
|
925
|
+
sig do
|
926
|
+
params(
|
927
|
+
name: ::String,
|
928
|
+
final: T::Boolean,
|
929
|
+
sealed: T::Boolean,
|
930
|
+
superclass: T.nilable(::String),
|
931
|
+
abstract: T::Boolean,
|
932
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::ClassNamespace).void)
|
933
|
+
).returns(::Parlour::RbiGenerator::ClassNamespace)
|
934
|
+
end
|
935
|
+
def create_class(name, final: T.unsafe(nil), sealed: T.unsafe(nil), superclass: T.unsafe(nil), abstract: T.unsafe(nil), &block); end
|
936
|
+
|
937
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#572
|
938
|
+
sig do
|
939
|
+
params(
|
940
|
+
name: ::String,
|
941
|
+
value: ::String,
|
942
|
+
eigen_constant: T::Boolean,
|
943
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Constant).void)
|
944
|
+
).returns(::Parlour::RbiGenerator::Constant)
|
945
|
+
end
|
946
|
+
def create_constant(name, value:, eigen_constant: T.unsafe(nil), &block); end
|
947
|
+
|
948
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#215
|
949
|
+
sig do
|
950
|
+
params(
|
951
|
+
name: ::String,
|
952
|
+
final: T::Boolean,
|
953
|
+
sealed: T::Boolean,
|
954
|
+
enums: T.nilable(T::Array[T.any(::String, [::String, ::String])]),
|
955
|
+
abstract: T::Boolean,
|
956
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::EnumClassNamespace).void)
|
957
|
+
).returns(::Parlour::RbiGenerator::EnumClassNamespace)
|
958
|
+
end
|
959
|
+
def create_enum_class(name, final: T.unsafe(nil), sealed: T.unsafe(nil), enums: T.unsafe(nil), abstract: T.unsafe(nil), &block); end
|
960
|
+
|
961
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#496
|
962
|
+
sig do
|
963
|
+
params(
|
964
|
+
name: ::String,
|
965
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Extend).void)
|
966
|
+
).returns(::Parlour::RbiGenerator::Extend)
|
967
|
+
end
|
968
|
+
def create_extend(name, &block); end
|
969
|
+
|
970
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#515
|
971
|
+
sig { params(extendables: T::Array[::String]).returns(T::Array[::Parlour::RbiGenerator::Extend]) }
|
972
|
+
def create_extends(extendables); end
|
973
|
+
|
974
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#533
|
975
|
+
sig do
|
976
|
+
params(
|
977
|
+
name: ::String,
|
978
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Include).void)
|
979
|
+
).returns(::Parlour::RbiGenerator::Include)
|
980
|
+
end
|
981
|
+
def create_include(name, &block); end
|
982
|
+
|
983
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#552
|
984
|
+
sig { params(includables: T::Array[::String]).returns(T::Array[::Parlour::RbiGenerator::Include]) }
|
985
|
+
def create_includes(includables); end
|
986
|
+
|
987
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#326
|
988
|
+
sig do
|
989
|
+
params(
|
990
|
+
name: ::String,
|
991
|
+
parameters: T.nilable(T::Array[::Parlour::RbiGenerator::Parameter]),
|
992
|
+
return_type: T.nilable(T.any(::Parlour::Types::Type, ::String)),
|
993
|
+
returns: T.nilable(T.any(::Parlour::Types::Type, ::String)),
|
994
|
+
abstract: T::Boolean,
|
995
|
+
implementation: T::Boolean,
|
996
|
+
override: T::Boolean,
|
997
|
+
overridable: T::Boolean,
|
998
|
+
class_method: T::Boolean,
|
999
|
+
final: T::Boolean,
|
1000
|
+
type_parameters: T.nilable(T::Array[::Symbol]),
|
1001
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::Method).void)
|
1002
|
+
).returns(::Parlour::RbiGenerator::Method)
|
1003
|
+
end
|
1004
|
+
def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), returns: T.unsafe(nil), abstract: T.unsafe(nil), implementation: T.unsafe(nil), override: T.unsafe(nil), overridable: T.unsafe(nil), class_method: T.unsafe(nil), final: T.unsafe(nil), type_parameters: T.unsafe(nil), &block); end
|
1005
|
+
|
1006
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#282
|
1007
|
+
sig do
|
1008
|
+
params(
|
1009
|
+
name: ::String,
|
1010
|
+
final: T::Boolean,
|
1011
|
+
sealed: T::Boolean,
|
1012
|
+
interface: T::Boolean,
|
1013
|
+
abstract: T::Boolean,
|
1014
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::ClassNamespace).void)
|
1015
|
+
).returns(::Parlour::RbiGenerator::ModuleNamespace)
|
1016
|
+
end
|
1017
|
+
def create_module(name, final: T.unsafe(nil), sealed: T.unsafe(nil), interface: T.unsafe(nil), abstract: T.unsafe(nil), &block); end
|
1018
|
+
|
1019
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#246
|
1020
|
+
sig do
|
1021
|
+
params(
|
1022
|
+
name: ::String,
|
1023
|
+
final: T::Boolean,
|
1024
|
+
sealed: T::Boolean,
|
1025
|
+
props: T.nilable(T::Array[::Parlour::RbiGenerator::StructProp]),
|
1026
|
+
abstract: T::Boolean,
|
1027
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::StructClassNamespace).void)
|
1028
|
+
).returns(::Parlour::RbiGenerator::StructClassNamespace)
|
1029
|
+
end
|
1030
|
+
def create_struct_class(name, final: T.unsafe(nil), sealed: T.unsafe(nil), props: T.unsafe(nil), abstract: T.unsafe(nil), &block); end
|
1031
|
+
|
1032
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#595
|
1033
|
+
sig do
|
1034
|
+
params(
|
1035
|
+
name: ::String,
|
1036
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
1037
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::TypeAlias).void)
|
1038
|
+
).returns(::Parlour::RbiGenerator::TypeAlias)
|
1039
|
+
end
|
1040
|
+
def create_type_alias(name, type:, &block); end
|
1041
|
+
|
1042
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#651
|
1043
|
+
sig { override.overridable.returns(::String) }
|
1044
|
+
def describe; end
|
1045
|
+
|
1046
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#71
|
1047
|
+
sig { returns(T::Array[::Parlour::RbiGenerator::Extend]) }
|
1048
|
+
def extends; end
|
1049
|
+
|
1050
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#56
|
1051
|
+
sig { returns(T::Boolean) }
|
1052
|
+
def final; end
|
1053
|
+
|
1054
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#657
|
1055
|
+
sig { override.void }
|
1056
|
+
def generalize_from_rbi!; end
|
1057
|
+
|
1058
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#20
|
1059
|
+
sig { override.overridable.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
1060
|
+
def generate_rbi(indent_level, options); end
|
1061
|
+
|
1062
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#81
|
1063
|
+
sig { returns(T::Array[::Parlour::RbiGenerator::Include]) }
|
1064
|
+
def includes; end
|
1065
|
+
|
1066
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#638
|
1067
|
+
sig { override.overridable.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void }
|
1068
|
+
def merge_into_self(others); end
|
1069
|
+
|
1070
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#620
|
1071
|
+
sig { override.overridable.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
1072
|
+
def mergeable?(others); end
|
1073
|
+
|
1074
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#115
|
1075
|
+
sig { params(object: T.untyped, block: T.proc.params(x: ::Parlour::RbiGenerator::Namespace).void).void }
|
1076
|
+
def path(object, &block); end
|
1077
|
+
|
1078
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#61
|
1079
|
+
sig { returns(T::Boolean) }
|
1080
|
+
def sealed; end
|
1081
|
+
|
1082
|
+
# @return [Array<RbiGenerator::TypeAlias>]
|
1083
|
+
#
|
1084
|
+
# source://sorbet-runtime/0.5.11690/lib/types/private/methods/_methods.rb#257
|
1085
|
+
def type_aliases(*args, **_arg1, &blk); end
|
1086
|
+
|
1087
|
+
private
|
1088
|
+
|
1089
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#675
|
1090
|
+
sig { overridable.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
1091
|
+
def generate_body(indent_level, options); end
|
1092
|
+
|
1093
|
+
# source://parlour//lib/parlour/rbi_generator/namespace.rb#766
|
1094
|
+
sig { params(object: ::Parlour::RbiGenerator::RbiObject).void }
|
1095
|
+
def move_next_comments(object); end
|
1096
|
+
end
|
1097
|
+
|
1098
|
+
# For backwards compatibility.
|
1099
|
+
# Before Parlour 5.0, Parlour::Options was Parlour::RbiGenerator::Options.
|
1100
|
+
#
|
1101
|
+
# source://parlour//lib/parlour/rbi_generator.rb#7
|
1102
|
+
Parlour::RbiGenerator::Options = Parlour::Options
|
1103
|
+
|
1104
|
+
# Represents a method parameter with a Sorbet type signature.
|
1105
|
+
#
|
1106
|
+
# source://parlour//lib/parlour/rbi_generator/parameter.rb#6
|
1107
|
+
class Parlour::RbiGenerator::Parameter
|
1108
|
+
extend T::Sig
|
1109
|
+
|
1110
|
+
# source://parlour//lib/parlour/rbi_generator/parameter.rb#37
|
1111
|
+
sig do
|
1112
|
+
params(
|
1113
|
+
name: ::String,
|
1114
|
+
type: T.nilable(T.any(::Parlour::Types::Type, ::String)),
|
1115
|
+
default: T.nilable(::String)
|
1116
|
+
).void
|
1117
|
+
end
|
1118
|
+
def initialize(name, type: T.unsafe(nil), default: T.unsafe(nil)); end
|
1119
|
+
|
1120
|
+
# source://parlour//lib/parlour/rbi_generator/parameter.rb#56
|
1121
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
1122
|
+
def ==(other); end
|
1123
|
+
|
1124
|
+
# source://parlour//lib/parlour/rbi_generator/parameter.rb#95
|
1125
|
+
sig { returns(T.nilable(::String)) }
|
1126
|
+
def default; end
|
1127
|
+
|
1128
|
+
# source://parlour//lib/parlour/rbi_generator/parameter.rb#134
|
1129
|
+
sig { void }
|
1130
|
+
def generalize_from_rbi!; end
|
1131
|
+
|
1132
|
+
# source://parlour//lib/parlour/rbi_generator/parameter.rb#101
|
1133
|
+
sig { returns(::Symbol) }
|
1134
|
+
def kind; end
|
1135
|
+
|
1136
|
+
# source://parlour//lib/parlour/rbi_generator/parameter.rb#68
|
1137
|
+
sig { returns(::String) }
|
1138
|
+
def name; end
|
1139
|
+
|
1140
|
+
# source://parlour//lib/parlour/rbi_generator/parameter.rb#75
|
1141
|
+
sig { returns(::String) }
|
1142
|
+
def name_without_kind; end
|
1143
|
+
|
1144
|
+
# source://parlour//lib/parlour/rbi_generator/parameter.rb#107
|
1145
|
+
sig { returns(::String) }
|
1146
|
+
def to_def_param; end
|
1147
|
+
|
1148
|
+
# source://parlour//lib/parlour/rbi_generator/parameter.rb#121
|
1149
|
+
sig { returns(::String) }
|
1150
|
+
def to_sig_param; end
|
1151
|
+
|
1152
|
+
# source://parlour//lib/parlour/rbi_generator/parameter.rb#88
|
1153
|
+
sig { returns(T.any(::Parlour::Types::Type, ::String)) }
|
1154
|
+
def type; end
|
1155
|
+
end
|
1156
|
+
|
1157
|
+
# A mapping of {kind} values to the characteristic prefixes each kind has.
|
1158
|
+
#
|
1159
|
+
# source://parlour//lib/parlour/rbi_generator/parameter.rb#126
|
1160
|
+
Parlour::RbiGenerator::Parameter::PREFIXES = T.let(T.unsafe(nil), Hash)
|
1161
|
+
|
1162
|
+
# An abstract class which is subclassed by any classes which can generate
|
1163
|
+
# entire lines of an RBI, such as {Namespace} and {Method}. (As an example,
|
1164
|
+
# {Parameter} is _not_ a subclass because it does not generate lines, only
|
1165
|
+
# segments of definition and signature lines.)
|
1166
|
+
#
|
1167
|
+
# @abstract
|
1168
|
+
#
|
1169
|
+
# source://parlour//lib/parlour/rbi_generator/rbi_object.rb#9
|
1170
|
+
class Parlour::RbiGenerator::RbiObject < ::Parlour::TypedObject
|
1171
|
+
abstract!
|
1172
|
+
|
1173
|
+
# source://parlour//lib/parlour/rbi_generator/rbi_object.rb#19
|
1174
|
+
sig { params(generator: ::Parlour::Generator, name: ::String).void }
|
1175
|
+
def initialize(generator, name); end
|
1176
|
+
|
1177
|
+
# source://parlour//lib/parlour/rbi_generator/rbi_object.rb#73
|
1178
|
+
sig { override.overridable.returns(::String) }
|
1179
|
+
def describe; end
|
1180
|
+
|
1181
|
+
# @abstract
|
1182
|
+
#
|
1183
|
+
# source://parlour//lib/parlour/rbi_generator/rbi_object.rb#84
|
1184
|
+
sig { abstract.void }
|
1185
|
+
def generalize_from_rbi!; end
|
1186
|
+
|
1187
|
+
# @abstract
|
1188
|
+
#
|
1189
|
+
# source://parlour//lib/parlour/rbi_generator/rbi_object.rb#42
|
1190
|
+
sig { abstract.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
1191
|
+
def generate_rbi(indent_level, options); end
|
1192
|
+
|
1193
|
+
# source://parlour//lib/parlour/rbi_generator/rbi_object.rb#28
|
1194
|
+
sig { returns(::Parlour::Generator) }
|
1195
|
+
def generator; end
|
1196
|
+
|
1197
|
+
# @abstract
|
1198
|
+
#
|
1199
|
+
# source://parlour//lib/parlour/rbi_generator/rbi_object.rb#70
|
1200
|
+
sig { abstract.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void }
|
1201
|
+
def merge_into_self(others); end
|
1202
|
+
|
1203
|
+
# @abstract
|
1204
|
+
#
|
1205
|
+
# source://parlour//lib/parlour/rbi_generator/rbi_object.rb#56
|
1206
|
+
sig { abstract.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
1207
|
+
def mergeable?(others); end
|
1208
|
+
end
|
1209
|
+
|
1210
|
+
# Represents an struct definition; that is, a class which subclasses
|
1211
|
+
# +T::Struct+ and declares `prop` members.
|
1212
|
+
#
|
1213
|
+
# source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#6
|
1214
|
+
class Parlour::RbiGenerator::StructClassNamespace < ::Parlour::RbiGenerator::ClassNamespace
|
1215
|
+
extend T::Sig
|
1216
|
+
|
1217
|
+
# source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#31
|
1218
|
+
sig do
|
1219
|
+
params(
|
1220
|
+
generator: ::Parlour::Generator,
|
1221
|
+
name: ::String,
|
1222
|
+
final: T::Boolean,
|
1223
|
+
sealed: T::Boolean,
|
1224
|
+
props: T::Array[::Parlour::RbiGenerator::StructProp],
|
1225
|
+
abstract: T::Boolean,
|
1226
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::StructClassNamespace).void)
|
1227
|
+
).void
|
1228
|
+
end
|
1229
|
+
def initialize(generator, name, final, sealed, props, abstract, &block); end
|
1230
|
+
|
1231
|
+
# source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#105
|
1232
|
+
sig { override.void }
|
1233
|
+
def generalize_from_rbi!; end
|
1234
|
+
|
1235
|
+
# source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#53
|
1236
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
1237
|
+
def generate_body(indent_level, options); end
|
1238
|
+
|
1239
|
+
# source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#93
|
1240
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void }
|
1241
|
+
def merge_into_self(others); end
|
1242
|
+
|
1243
|
+
# source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#75
|
1244
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
1245
|
+
def mergeable?(others); end
|
1246
|
+
|
1247
|
+
# source://parlour//lib/parlour/rbi_generator/struct_class_namespace.rb#39
|
1248
|
+
sig { returns(T::Array[::Parlour::RbiGenerator::StructProp]) }
|
1249
|
+
def props; end
|
1250
|
+
end
|
1251
|
+
|
1252
|
+
# Represents a +T::Struct+ property.
|
1253
|
+
#
|
1254
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#5
|
1255
|
+
class Parlour::RbiGenerator::StructProp
|
1256
|
+
extend T::Sig
|
1257
|
+
|
1258
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#33
|
1259
|
+
sig do
|
1260
|
+
params(
|
1261
|
+
name: ::String,
|
1262
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
1263
|
+
optional: T.nilable(T.any(::Symbol, T::Boolean)),
|
1264
|
+
enum: T.nilable(::String),
|
1265
|
+
dont_store: T.nilable(T::Boolean),
|
1266
|
+
foreign: T.nilable(::String),
|
1267
|
+
default: T.nilable(::String),
|
1268
|
+
factory: T.nilable(::String),
|
1269
|
+
immutable: T.nilable(T::Boolean),
|
1270
|
+
array: T.nilable(::String),
|
1271
|
+
override: T.nilable(T::Boolean),
|
1272
|
+
redaction: T.nilable(::String)
|
1273
|
+
).void
|
1274
|
+
end
|
1275
|
+
def initialize(name, type, optional: T.unsafe(nil), enum: T.unsafe(nil), dont_store: T.unsafe(nil), foreign: T.unsafe(nil), default: T.unsafe(nil), factory: T.unsafe(nil), immutable: T.unsafe(nil), array: T.unsafe(nil), override: T.unsafe(nil), redaction: T.unsafe(nil)); end
|
1276
|
+
|
1277
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#57
|
1278
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
1279
|
+
def ==(other); end
|
1280
|
+
|
1281
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#106
|
1282
|
+
sig { returns(T.nilable(::String)) }
|
1283
|
+
def array; end
|
1284
|
+
|
1285
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#97
|
1286
|
+
sig { returns(T.nilable(::String)) }
|
1287
|
+
def default; end
|
1288
|
+
|
1289
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#91
|
1290
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1291
|
+
def dont_store; end
|
1292
|
+
|
1293
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#88
|
1294
|
+
sig { returns(T.nilable(::String)) }
|
1295
|
+
def enum; end
|
1296
|
+
|
1297
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#100
|
1298
|
+
sig { returns(T.nilable(::String)) }
|
1299
|
+
def factory; end
|
1300
|
+
|
1301
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#94
|
1302
|
+
sig { returns(T.nilable(::String)) }
|
1303
|
+
def foreign; end
|
1304
|
+
|
1305
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#134
|
1306
|
+
sig { void }
|
1307
|
+
def generalize_from_rbi!; end
|
1308
|
+
|
1309
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#103
|
1310
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1311
|
+
def immutable; end
|
1312
|
+
|
1313
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#77
|
1314
|
+
sig { returns(::String) }
|
1315
|
+
def name; end
|
1316
|
+
|
1317
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#85
|
1318
|
+
sig { returns(T.nilable(T.any(::Symbol, T::Boolean))) }
|
1319
|
+
def optional; end
|
1320
|
+
|
1321
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#109
|
1322
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1323
|
+
def override; end
|
1324
|
+
|
1325
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#112
|
1326
|
+
sig { returns(T.nilable(::String)) }
|
1327
|
+
def redaction; end
|
1328
|
+
|
1329
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#122
|
1330
|
+
sig { returns(::String) }
|
1331
|
+
def to_prop_call; end
|
1332
|
+
|
1333
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#82
|
1334
|
+
sig { returns(T.any(::Parlour::Types::Type, ::String)) }
|
1335
|
+
def type; end
|
1336
|
+
end
|
1337
|
+
|
1338
|
+
# The optional properties available on instances of this class.
|
1339
|
+
#
|
1340
|
+
# source://parlour//lib/parlour/rbi_generator/struct_prop.rb#115
|
1341
|
+
Parlour::RbiGenerator::StructProp::EXTRA_PROPERTIES = T.let(T.unsafe(nil), Array)
|
1342
|
+
|
1343
|
+
# Represents a type alias.
|
1344
|
+
#
|
1345
|
+
# source://parlour//lib/parlour/rbi_generator/type_alias.rb#5
|
1346
|
+
class Parlour::RbiGenerator::TypeAlias < ::Parlour::RbiGenerator::RbiObject
|
1347
|
+
# source://parlour//lib/parlour/rbi_generator/type_alias.rb#18
|
1348
|
+
sig do
|
1349
|
+
params(
|
1350
|
+
generator: ::Parlour::Generator,
|
1351
|
+
name: ::String,
|
1352
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
1353
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbiGenerator::TypeAlias).void)
|
1354
|
+
).void
|
1355
|
+
end
|
1356
|
+
def initialize(generator, name:, type:, &block); end
|
1357
|
+
|
1358
|
+
# source://parlour//lib/parlour/rbi_generator/type_alias.rb#34
|
1359
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
1360
|
+
def ==(other); end
|
1361
|
+
|
1362
|
+
# source://parlour//lib/parlour/rbi_generator/type_alias.rb#91
|
1363
|
+
sig { override.returns(::String) }
|
1364
|
+
def describe; end
|
1365
|
+
|
1366
|
+
# source://parlour//lib/parlour/rbi_generator/type_alias.rb#96
|
1367
|
+
sig { override.void }
|
1368
|
+
def generalize_from_rbi!; end
|
1369
|
+
|
1370
|
+
# source://parlour//lib/parlour/rbi_generator/type_alias.rb#49
|
1371
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
1372
|
+
def generate_rbi(indent_level, options); end
|
1373
|
+
|
1374
|
+
# source://parlour//lib/parlour/rbi_generator/type_alias.rb#83
|
1375
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).void }
|
1376
|
+
def merge_into_self(others); end
|
1377
|
+
|
1378
|
+
# source://parlour//lib/parlour/rbi_generator/type_alias.rb#66
|
1379
|
+
sig { override.params(others: T::Array[::Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
1380
|
+
def mergeable?(others); end
|
1381
|
+
|
1382
|
+
# source://parlour//lib/parlour/rbi_generator/type_alias.rb#26
|
1383
|
+
sig { returns(T.any(::Parlour::Types::Type, ::String)) }
|
1384
|
+
def type; end
|
1385
|
+
end
|
1386
|
+
|
1387
|
+
# The RBS generator.
|
1388
|
+
#
|
1389
|
+
# source://parlour//lib/parlour/rbs_generator/rbs_object.rb#8
|
1390
|
+
class Parlour::RbsGenerator < ::Parlour::Generator
|
1391
|
+
# @return [RbsGenerator] a new instance of RbsGenerator
|
1392
|
+
#
|
1393
|
+
# source://parlour//lib/parlour/rbs_generator.rb#5
|
1394
|
+
sig { params(hash: T.untyped).void }
|
1395
|
+
def initialize(**hash); end
|
1396
|
+
|
1397
|
+
# source://parlour//lib/parlour/rbs_generator.rb#19
|
1398
|
+
sig { overridable.returns(::String) }
|
1399
|
+
def rbs; end
|
1400
|
+
|
1401
|
+
# source://parlour//lib/parlour/rbs_generator.rb#13
|
1402
|
+
sig { overridable.returns(::Parlour::RbsGenerator::Namespace) }
|
1403
|
+
def root; end
|
1404
|
+
end
|
1405
|
+
|
1406
|
+
# Represents miscellaneous Ruby code.
|
1407
|
+
#
|
1408
|
+
# source://parlour//lib/parlour/rbs_generator/arbitrary.rb#5
|
1409
|
+
class Parlour::RbsGenerator::Arbitrary < ::Parlour::RbsGenerator::RbsObject
|
1410
|
+
# source://parlour//lib/parlour/rbs_generator/arbitrary.rb#17
|
1411
|
+
sig do
|
1412
|
+
params(
|
1413
|
+
generator: ::Parlour::Generator,
|
1414
|
+
code: ::String,
|
1415
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Arbitrary).void)
|
1416
|
+
).void
|
1417
|
+
end
|
1418
|
+
def initialize(generator, code: T.unsafe(nil), &block); end
|
1419
|
+
|
1420
|
+
# source://parlour//lib/parlour/rbs_generator/arbitrary.rb#33
|
1421
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
1422
|
+
def ==(other); end
|
1423
|
+
|
1424
|
+
# source://parlour//lib/parlour/rbs_generator/arbitrary.rb#25
|
1425
|
+
sig { returns(::String) }
|
1426
|
+
def code; end
|
1427
|
+
|
1428
|
+
# @return [String]
|
1429
|
+
#
|
1430
|
+
# source://parlour//lib/parlour/rbs_generator/arbitrary.rb#25
|
1431
|
+
def code=(_arg0); end
|
1432
|
+
|
1433
|
+
# source://parlour//lib/parlour/rbs_generator/arbitrary.rb#87
|
1434
|
+
sig { override.returns(::String) }
|
1435
|
+
def describe; end
|
1436
|
+
|
1437
|
+
# source://parlour//lib/parlour/rbs_generator/arbitrary.rb#48
|
1438
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
1439
|
+
def generate_rbs(indent_level, options); end
|
1440
|
+
|
1441
|
+
# source://parlour//lib/parlour/rbs_generator/arbitrary.rb#79
|
1442
|
+
sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void }
|
1443
|
+
def merge_into_self(others); end
|
1444
|
+
|
1445
|
+
# source://parlour//lib/parlour/rbs_generator/arbitrary.rb#63
|
1446
|
+
sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
1447
|
+
def mergeable?(others); end
|
1448
|
+
end
|
1449
|
+
|
1450
|
+
# Represents an attribute reader, writer or accessor.
|
1451
|
+
#
|
1452
|
+
# source://parlour//lib/parlour/rbs_generator/attribute.rb#5
|
1453
|
+
class Parlour::RbsGenerator::Attribute < ::Parlour::RbsGenerator::Method
|
1454
|
+
extend T::Sig
|
1455
|
+
|
1456
|
+
# source://parlour//lib/parlour/rbs_generator/attribute.rb#27
|
1457
|
+
sig do
|
1458
|
+
params(
|
1459
|
+
generator: ::Parlour::Generator,
|
1460
|
+
name: ::String,
|
1461
|
+
kind: ::Symbol,
|
1462
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
1463
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Attribute).void)
|
1464
|
+
).void
|
1465
|
+
end
|
1466
|
+
def initialize(generator, name, kind, type, &block); end
|
1467
|
+
|
1468
|
+
# source://parlour//lib/parlour/rbs_generator/attribute.rb#75
|
1469
|
+
sig { override.params(other: ::Object).returns(T::Boolean) }
|
1470
|
+
def ==(other); end
|
1471
|
+
|
1472
|
+
# source://parlour//lib/parlour/rbs_generator/attribute.rb#62
|
1473
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
1474
|
+
def generate_rbs(indent_level, options); end
|
1475
|
+
|
1476
|
+
# source://parlour//lib/parlour/rbs_generator/attribute.rb#45
|
1477
|
+
sig { returns(::Symbol) }
|
1478
|
+
def kind; end
|
1479
|
+
|
1480
|
+
# source://parlour//lib/parlour/rbs_generator/attribute.rb#49
|
1481
|
+
sig { returns(T.any(::Parlour::Types::Type, ::String)) }
|
1482
|
+
def type; end
|
1483
|
+
end
|
1484
|
+
|
1485
|
+
# Represents a block in a method signature.
|
1486
|
+
# (This is not an RbsObject because it doesn't generate a full line.)
|
1487
|
+
#
|
1488
|
+
# source://parlour//lib/parlour/rbs_generator/block.rb#6
|
1489
|
+
class Parlour::RbsGenerator::Block
|
1490
|
+
extend T::Sig
|
1491
|
+
|
1492
|
+
# source://parlour//lib/parlour/rbs_generator/block.rb#14
|
1493
|
+
sig { params(type: ::Parlour::Types::Proc, required: T::Boolean).void }
|
1494
|
+
def initialize(type, required); end
|
1495
|
+
|
1496
|
+
# source://parlour//lib/parlour/rbs_generator/block.rb#25
|
1497
|
+
sig { overridable.params(other: ::Object).returns(T::Boolean) }
|
1498
|
+
def ==(other); end
|
1499
|
+
|
1500
|
+
# source://parlour//lib/parlour/rbs_generator/block.rb#44
|
1501
|
+
sig { params(options: ::Parlour::Options).returns(T::Array[::String]) }
|
1502
|
+
def generate_rbs(options); end
|
1503
|
+
|
1504
|
+
# source://parlour//lib/parlour/rbs_generator/block.rb#37
|
1505
|
+
sig { returns(T::Boolean) }
|
1506
|
+
def required; end
|
1507
|
+
|
1508
|
+
# source://parlour//lib/parlour/rbs_generator/block.rb#32
|
1509
|
+
sig { returns(::Parlour::Types::Proc) }
|
1510
|
+
def type; end
|
1511
|
+
end
|
1512
|
+
|
1513
|
+
# Represents a class definition.
|
1514
|
+
#
|
1515
|
+
# source://parlour//lib/parlour/rbs_generator/class_namespace.rb#5
|
1516
|
+
class Parlour::RbsGenerator::ClassNamespace < ::Parlour::RbsGenerator::Namespace
|
1517
|
+
extend T::Sig
|
1518
|
+
|
1519
|
+
# source://parlour//lib/parlour/rbs_generator/class_namespace.rb#27
|
1520
|
+
sig do
|
1521
|
+
params(
|
1522
|
+
generator: ::Parlour::Generator,
|
1523
|
+
name: ::String,
|
1524
|
+
superclass: T.nilable(T.any(::Parlour::Types::Type, ::String)),
|
1525
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::ClassNamespace).void)
|
1526
|
+
).void
|
1527
|
+
end
|
1528
|
+
def initialize(generator, name, superclass, &block); end
|
1529
|
+
|
1530
|
+
# source://parlour//lib/parlour/rbs_generator/class_namespace.rb#99
|
1531
|
+
sig { override.returns(::String) }
|
1532
|
+
def describe; end
|
1533
|
+
|
1534
|
+
# source://parlour//lib/parlour/rbs_generator/class_namespace.rb#38
|
1535
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
1536
|
+
def generate_rbs(indent_level, options); end
|
1537
|
+
|
1538
|
+
# source://parlour//lib/parlour/rbs_generator/class_namespace.rb#85
|
1539
|
+
sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void }
|
1540
|
+
def merge_into_self(others); end
|
1541
|
+
|
1542
|
+
# source://parlour//lib/parlour/rbs_generator/class_namespace.rb#66
|
1543
|
+
sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
1544
|
+
def mergeable?(others); end
|
1545
|
+
|
1546
|
+
# source://parlour//lib/parlour/rbs_generator/class_namespace.rb#52
|
1547
|
+
sig { returns(T.nilable(T.any(::Parlour::Types::Type, ::String))) }
|
1548
|
+
def superclass; end
|
1549
|
+
end
|
1550
|
+
|
1551
|
+
# Represents a constant definition.
|
1552
|
+
#
|
1553
|
+
# source://parlour//lib/parlour/rbs_generator/constant.rb#5
|
1554
|
+
class Parlour::RbsGenerator::Constant < ::Parlour::RbsGenerator::RbsObject
|
1555
|
+
# source://parlour//lib/parlour/rbs_generator/constant.rb#19
|
1556
|
+
sig do
|
1557
|
+
params(
|
1558
|
+
generator: ::Parlour::Generator,
|
1559
|
+
name: ::String,
|
1560
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
1561
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Constant).void)
|
1562
|
+
).void
|
1563
|
+
end
|
1564
|
+
def initialize(generator, name, type:, &block); end
|
1565
|
+
|
1566
|
+
# source://parlour//lib/parlour/rbs_generator/constant.rb#35
|
1567
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
1568
|
+
def ==(other); end
|
1569
|
+
|
1570
|
+
# source://parlour//lib/parlour/rbs_generator/constant.rb#90
|
1571
|
+
sig { override.returns(::String) }
|
1572
|
+
def describe; end
|
1573
|
+
|
1574
|
+
# source://parlour//lib/parlour/rbs_generator/constant.rb#50
|
1575
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
1576
|
+
def generate_rbs(indent_level, options); end
|
1577
|
+
|
1578
|
+
# source://parlour//lib/parlour/rbs_generator/constant.rb#82
|
1579
|
+
sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void }
|
1580
|
+
def merge_into_self(others); end
|
1581
|
+
|
1582
|
+
# source://parlour//lib/parlour/rbs_generator/constant.rb#65
|
1583
|
+
sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
1584
|
+
def mergeable?(others); end
|
1585
|
+
|
1586
|
+
# source://parlour//lib/parlour/rbs_generator/constant.rb#27
|
1587
|
+
sig { returns(T.any(::Parlour::Types::Type, ::String)) }
|
1588
|
+
def type; end
|
1589
|
+
end
|
1590
|
+
|
1591
|
+
# Represents an +extend+ call.
|
1592
|
+
#
|
1593
|
+
# source://parlour//lib/parlour/rbs_generator/extend.rb#5
|
1594
|
+
class Parlour::RbsGenerator::Extend < ::Parlour::RbsGenerator::RbsObject
|
1595
|
+
# source://parlour//lib/parlour/rbs_generator/extend.rb#16
|
1596
|
+
sig do
|
1597
|
+
params(
|
1598
|
+
generator: ::Parlour::Generator,
|
1599
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
1600
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Extend).void)
|
1601
|
+
).void
|
1602
|
+
end
|
1603
|
+
def initialize(generator, type:, &block); end
|
1604
|
+
|
1605
|
+
# source://parlour//lib/parlour/rbs_generator/extend.rb#28
|
1606
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
1607
|
+
def ==(other); end
|
1608
|
+
|
1609
|
+
# source://parlour//lib/parlour/rbs_generator/extend.rb#87
|
1610
|
+
sig { override.returns(::String) }
|
1611
|
+
def describe; end
|
1612
|
+
|
1613
|
+
# source://parlour//lib/parlour/rbs_generator/extend.rb#47
|
1614
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
1615
|
+
def generate_rbs(indent_level, options); end
|
1616
|
+
|
1617
|
+
# source://parlour//lib/parlour/rbs_generator/extend.rb#79
|
1618
|
+
sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void }
|
1619
|
+
def merge_into_self(others); end
|
1620
|
+
|
1621
|
+
# source://parlour//lib/parlour/rbs_generator/extend.rb#62
|
1622
|
+
sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
1623
|
+
def mergeable?(others); end
|
1624
|
+
|
1625
|
+
# source://parlour//lib/parlour/rbs_generator/extend.rb#34
|
1626
|
+
sig { returns(T.any(::Parlour::Types::Type, ::String)) }
|
1627
|
+
def type; end
|
1628
|
+
end
|
1629
|
+
|
1630
|
+
# Represents an +include+ call.
|
1631
|
+
#
|
1632
|
+
# source://parlour//lib/parlour/rbs_generator/include.rb#5
|
1633
|
+
class Parlour::RbsGenerator::Include < ::Parlour::RbsGenerator::RbsObject
|
1634
|
+
# source://parlour//lib/parlour/rbs_generator/include.rb#16
|
1635
|
+
sig do
|
1636
|
+
params(
|
1637
|
+
generator: ::Parlour::Generator,
|
1638
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
1639
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Include).void)
|
1640
|
+
).void
|
1641
|
+
end
|
1642
|
+
def initialize(generator, type:, &block); end
|
1643
|
+
|
1644
|
+
# source://parlour//lib/parlour/rbs_generator/include.rb#28
|
1645
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
1646
|
+
def ==(other); end
|
1647
|
+
|
1648
|
+
# source://parlour//lib/parlour/rbs_generator/include.rb#87
|
1649
|
+
sig { override.returns(::String) }
|
1650
|
+
def describe; end
|
1651
|
+
|
1652
|
+
# source://parlour//lib/parlour/rbs_generator/include.rb#47
|
1653
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
1654
|
+
def generate_rbs(indent_level, options); end
|
1655
|
+
|
1656
|
+
# source://parlour//lib/parlour/rbs_generator/include.rb#79
|
1657
|
+
sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void }
|
1658
|
+
def merge_into_self(others); end
|
1659
|
+
|
1660
|
+
# source://parlour//lib/parlour/rbs_generator/include.rb#62
|
1661
|
+
sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
1662
|
+
def mergeable?(others); end
|
1663
|
+
|
1664
|
+
# source://parlour//lib/parlour/rbs_generator/include.rb#34
|
1665
|
+
sig { returns(T.any(::Parlour::Types::Type, ::String)) }
|
1666
|
+
def type; end
|
1667
|
+
end
|
1668
|
+
|
1669
|
+
# Represents an interface definition.
|
1670
|
+
#
|
1671
|
+
# source://parlour//lib/parlour/rbs_generator/interface_namespace.rb#5
|
1672
|
+
class Parlour::RbsGenerator::InterfaceNamespace < ::Parlour::RbsGenerator::Namespace
|
1673
|
+
extend T::Sig
|
1674
|
+
|
1675
|
+
# source://parlour//lib/parlour/rbs_generator/interface_namespace.rb#29
|
1676
|
+
sig { override.returns(::String) }
|
1677
|
+
def describe; end
|
1678
|
+
|
1679
|
+
# source://parlour//lib/parlour/rbs_generator/interface_namespace.rb#19
|
1680
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
1681
|
+
def generate_rbs(indent_level, options); end
|
1682
|
+
end
|
1683
|
+
|
1684
|
+
# Represents a method definition.
|
1685
|
+
#
|
1686
|
+
# source://parlour//lib/parlour/rbs_generator/method.rb#5
|
1687
|
+
class Parlour::RbsGenerator::Method < ::Parlour::RbsGenerator::RbsObject
|
1688
|
+
extend T::Sig
|
1689
|
+
|
1690
|
+
# source://parlour//lib/parlour/rbs_generator/method.rb#29
|
1691
|
+
sig do
|
1692
|
+
params(
|
1693
|
+
generator: ::Parlour::Generator,
|
1694
|
+
name: ::String,
|
1695
|
+
signatures: T::Array[::Parlour::RbsGenerator::MethodSignature],
|
1696
|
+
class_method: T::Boolean,
|
1697
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Method).void)
|
1698
|
+
).void
|
1699
|
+
end
|
1700
|
+
def initialize(generator, name, signatures, class_method: T.unsafe(nil), &block); end
|
1701
|
+
|
1702
|
+
# source://parlour//lib/parlour/rbs_generator/method.rb#42
|
1703
|
+
sig { overridable.params(other: ::Object).returns(T::Boolean) }
|
1704
|
+
def ==(other); end
|
1705
|
+
|
1706
|
+
# source://parlour//lib/parlour/rbs_generator/method.rb#58
|
1707
|
+
sig { returns(T::Boolean) }
|
1708
|
+
def class_method; end
|
1709
|
+
|
1710
|
+
# source://parlour//lib/parlour/rbs_generator/method.rb#140
|
1711
|
+
sig { override.returns(::String) }
|
1712
|
+
def describe; end
|
1713
|
+
|
1714
|
+
# source://parlour//lib/parlour/rbs_generator/method.rb#71
|
1715
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
1716
|
+
def generate_rbs(indent_level, options); end
|
1717
|
+
|
1718
|
+
# source://parlour//lib/parlour/rbs_generator/method.rb#132
|
1719
|
+
sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void }
|
1720
|
+
def merge_into_self(others); end
|
1721
|
+
|
1722
|
+
# source://parlour//lib/parlour/rbs_generator/method.rb#115
|
1723
|
+
sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
1724
|
+
def mergeable?(others); end
|
1725
|
+
|
1726
|
+
# source://parlour//lib/parlour/rbs_generator/method.rb#52
|
1727
|
+
sig { returns(T::Array[::Parlour::RbsGenerator::MethodSignature]) }
|
1728
|
+
def signatures; end
|
1729
|
+
end
|
1730
|
+
|
1731
|
+
# Represents one signature in a method definition.
|
1732
|
+
# (This is not an RbsObject because it doesn't generate a full line.)
|
1733
|
+
#
|
1734
|
+
# source://parlour//lib/parlour/rbs_generator/method_signature.rb#6
|
1735
|
+
class Parlour::RbsGenerator::MethodSignature
|
1736
|
+
extend T::Sig
|
1737
|
+
|
1738
|
+
# source://parlour//lib/parlour/rbs_generator/method_signature.rb#25
|
1739
|
+
sig do
|
1740
|
+
params(
|
1741
|
+
parameters: T::Array[::Parlour::RbsGenerator::Parameter],
|
1742
|
+
return_type: T.nilable(T.any(::Parlour::Types::Type, ::String)),
|
1743
|
+
block: T.nilable(::Parlour::RbsGenerator::Block),
|
1744
|
+
type_parameters: T.nilable(T::Array[::Symbol])
|
1745
|
+
).void
|
1746
|
+
end
|
1747
|
+
def initialize(parameters, return_type = T.unsafe(nil), block: T.unsafe(nil), type_parameters: T.unsafe(nil)); end
|
1748
|
+
|
1749
|
+
# source://parlour//lib/parlour/rbs_generator/method_signature.rb#38
|
1750
|
+
sig { overridable.params(other: ::Object).returns(T::Boolean) }
|
1751
|
+
def ==(other); end
|
1752
|
+
|
1753
|
+
# source://parlour//lib/parlour/rbs_generator/method_signature.rb#59
|
1754
|
+
sig { returns(T.nilable(::Parlour::RbsGenerator::Block)) }
|
1755
|
+
def block; end
|
1756
|
+
|
1757
|
+
# source://parlour//lib/parlour/rbs_generator/method_signature.rb#71
|
1758
|
+
sig { params(options: ::Parlour::Options).returns(T::Array[::String]) }
|
1759
|
+
def generate_rbs(options); end
|
1760
|
+
|
1761
|
+
# source://parlour//lib/parlour/rbs_generator/method_signature.rb#49
|
1762
|
+
sig { returns(T::Array[::Parlour::RbsGenerator::Parameter]) }
|
1763
|
+
def parameters; end
|
1764
|
+
|
1765
|
+
# source://parlour//lib/parlour/rbs_generator/method_signature.rb#54
|
1766
|
+
sig { returns(T.nilable(T.any(::Parlour::Types::Type, ::String))) }
|
1767
|
+
def return_type; end
|
1768
|
+
|
1769
|
+
# source://parlour//lib/parlour/rbs_generator/method_signature.rb#64
|
1770
|
+
sig { returns(T::Array[::Symbol]) }
|
1771
|
+
def type_parameters; end
|
1772
|
+
end
|
1773
|
+
|
1774
|
+
# Represents a module definition.
|
1775
|
+
#
|
1776
|
+
# source://parlour//lib/parlour/rbs_generator/module_namespace.rb#5
|
1777
|
+
class Parlour::RbsGenerator::ModuleNamespace < ::Parlour::RbsGenerator::Namespace
|
1778
|
+
extend T::Sig
|
1779
|
+
|
1780
|
+
# source://parlour//lib/parlour/rbs_generator/module_namespace.rb#29
|
1781
|
+
sig { override.returns(::String) }
|
1782
|
+
def describe; end
|
1783
|
+
|
1784
|
+
# source://parlour//lib/parlour/rbs_generator/module_namespace.rb#19
|
1785
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
1786
|
+
def generate_rbs(indent_level, options); end
|
1787
|
+
end
|
1788
|
+
|
1789
|
+
# A generic namespace. This shouldn't be used, except as the type of
|
1790
|
+
# {RbsGenerator#root}.
|
1791
|
+
#
|
1792
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#6
|
1793
|
+
class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject
|
1794
|
+
extend T::Sig
|
1795
|
+
|
1796
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#41
|
1797
|
+
sig do
|
1798
|
+
params(
|
1799
|
+
generator: ::Parlour::Generator,
|
1800
|
+
name: T.nilable(::String),
|
1801
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Namespace).void)
|
1802
|
+
).void
|
1803
|
+
end
|
1804
|
+
def initialize(generator, name = T.unsafe(nil), &block); end
|
1805
|
+
|
1806
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#135
|
1807
|
+
sig { params(comment: T.any(::String, T::Array[::String])).void }
|
1808
|
+
def add_comment_to_next_child(comment); end
|
1809
|
+
|
1810
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#76
|
1811
|
+
sig { returns(T::Array[::Parlour::RbsGenerator::TypeAlias]) }
|
1812
|
+
def aliases; end
|
1813
|
+
|
1814
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#51
|
1815
|
+
sig { returns(T::Array[::Parlour::RbsGenerator::RbsObject]) }
|
1816
|
+
def children; end
|
1817
|
+
|
1818
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#87
|
1819
|
+
sig { returns(T::Array[::Parlour::RbsGenerator::Constant]) }
|
1820
|
+
def constants; end
|
1821
|
+
|
1822
|
+
# Creates a new arbitrary code section.
|
1823
|
+
# You should rarely have to use this!
|
1824
|
+
#
|
1825
|
+
# @param code [String] The code to insert.
|
1826
|
+
# @param block A block which the new instance yields itself to.
|
1827
|
+
# @return [RbsGenerator::Arbitrary]
|
1828
|
+
#
|
1829
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#353
|
1830
|
+
sig { params(code: T.untyped, block: T.untyped).returns(T.untyped) }
|
1831
|
+
def create_arbitrary(code:, &block); end
|
1832
|
+
|
1833
|
+
# @param name [String]
|
1834
|
+
# @param kind [Symbol]
|
1835
|
+
# @param type [Types::TypeLike]
|
1836
|
+
# @param block [T.proc.params(x: Attribute).void, nil]
|
1837
|
+
# @return [Attribute]
|
1838
|
+
#
|
1839
|
+
# source://sorbet-runtime/0.5.11690/lib/types/private/methods/_methods.rb#257
|
1840
|
+
def create_attr(*args, **_arg1, &blk); end
|
1841
|
+
|
1842
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#343
|
1843
|
+
sig do
|
1844
|
+
params(
|
1845
|
+
name: ::String,
|
1846
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
1847
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Attribute).void)
|
1848
|
+
).returns(::Parlour::RbsGenerator::Attribute)
|
1849
|
+
end
|
1850
|
+
def create_attr_accessor(name, type:, &block); end
|
1851
|
+
|
1852
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#305
|
1853
|
+
sig do
|
1854
|
+
params(
|
1855
|
+
name: ::String,
|
1856
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
1857
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Attribute).void)
|
1858
|
+
).returns(::Parlour::RbsGenerator::Attribute)
|
1859
|
+
end
|
1860
|
+
def create_attr_reader(name, type:, &block); end
|
1861
|
+
|
1862
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#324
|
1863
|
+
sig do
|
1864
|
+
params(
|
1865
|
+
name: ::String,
|
1866
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
1867
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Attribute).void)
|
1868
|
+
).returns(::Parlour::RbsGenerator::Attribute)
|
1869
|
+
end
|
1870
|
+
def create_attr_writer(name, type:, &block); end
|
1871
|
+
|
1872
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#276
|
1873
|
+
sig do
|
1874
|
+
params(
|
1875
|
+
name: ::String,
|
1876
|
+
kind: ::Symbol,
|
1877
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
1878
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Attribute).void)
|
1879
|
+
).returns(::Parlour::RbsGenerator::Attribute)
|
1880
|
+
end
|
1881
|
+
def create_attribute(name, kind:, type:, &block); end
|
1882
|
+
|
1883
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#165
|
1884
|
+
sig do
|
1885
|
+
params(
|
1886
|
+
name: ::String,
|
1887
|
+
superclass: T.nilable(T.any(::Parlour::Types::Type, ::String)),
|
1888
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::ClassNamespace).void)
|
1889
|
+
).returns(::Parlour::RbsGenerator::ClassNamespace)
|
1890
|
+
end
|
1891
|
+
def create_class(name, superclass: T.unsafe(nil), &block); end
|
1892
|
+
|
1893
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#446
|
1894
|
+
sig do
|
1895
|
+
params(
|
1896
|
+
name: ::String,
|
1897
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
1898
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Constant).void)
|
1899
|
+
).returns(::Parlour::RbsGenerator::Constant)
|
1900
|
+
end
|
1901
|
+
def create_constant(name, type:, &block); end
|
1902
|
+
|
1903
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#373
|
1904
|
+
sig do
|
1905
|
+
params(
|
1906
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
1907
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Extend).void)
|
1908
|
+
).returns(::Parlour::RbsGenerator::Extend)
|
1909
|
+
end
|
1910
|
+
def create_extend(type, &block); end
|
1911
|
+
|
1912
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#392
|
1913
|
+
sig do
|
1914
|
+
params(
|
1915
|
+
extendables: T::Array[T.any(::Parlour::Types::Type, ::String)]
|
1916
|
+
).returns(T::Array[::Parlour::RbsGenerator::Extend])
|
1917
|
+
end
|
1918
|
+
def create_extends(extendables); end
|
1919
|
+
|
1920
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#409
|
1921
|
+
sig do
|
1922
|
+
params(
|
1923
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
1924
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Include).void)
|
1925
|
+
).returns(::Parlour::RbsGenerator::Include)
|
1926
|
+
end
|
1927
|
+
def create_include(type, &block); end
|
1928
|
+
|
1929
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#428
|
1930
|
+
sig do
|
1931
|
+
params(
|
1932
|
+
includables: T::Array[T.any(::Parlour::Types::Type, ::String)]
|
1933
|
+
).returns(T::Array[::Parlour::RbsGenerator::Include])
|
1934
|
+
end
|
1935
|
+
def create_includes(includables); end
|
1936
|
+
|
1937
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#207
|
1938
|
+
sig do
|
1939
|
+
params(
|
1940
|
+
name: ::String,
|
1941
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Namespace).void)
|
1942
|
+
).returns(::Parlour::RbsGenerator::InterfaceNamespace)
|
1943
|
+
end
|
1944
|
+
def create_interface(name, &block); end
|
1945
|
+
|
1946
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#232
|
1947
|
+
sig do
|
1948
|
+
params(
|
1949
|
+
name: ::String,
|
1950
|
+
signatures: T.nilable(T::Array[::Parlour::RbsGenerator::MethodSignature]),
|
1951
|
+
class_method: T::Boolean,
|
1952
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Method).void)
|
1953
|
+
).returns(::Parlour::RbsGenerator::Method)
|
1954
|
+
end
|
1955
|
+
def create_method(name, signatures = T.unsafe(nil), class_method: T.unsafe(nil), &block); end
|
1956
|
+
|
1957
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#186
|
1958
|
+
sig do
|
1959
|
+
params(
|
1960
|
+
name: ::String,
|
1961
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::Namespace).void)
|
1962
|
+
).returns(::Parlour::RbsGenerator::ModuleNamespace)
|
1963
|
+
end
|
1964
|
+
def create_module(name, &block); end
|
1965
|
+
|
1966
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#468
|
1967
|
+
sig do
|
1968
|
+
params(
|
1969
|
+
name: ::String,
|
1970
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
1971
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::TypeAlias).void)
|
1972
|
+
).returns(::Parlour::RbsGenerator::TypeAlias)
|
1973
|
+
end
|
1974
|
+
def create_type_alias(name, type:, &block); end
|
1975
|
+
|
1976
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#524
|
1977
|
+
sig { override.overridable.returns(::String) }
|
1978
|
+
def describe; end
|
1979
|
+
|
1980
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#56
|
1981
|
+
sig { returns(T::Array[::Parlour::RbsGenerator::Extend]) }
|
1982
|
+
def extends; end
|
1983
|
+
|
1984
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#20
|
1985
|
+
sig { override.overridable.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
1986
|
+
def generate_rbs(indent_level, options); end
|
1987
|
+
|
1988
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#66
|
1989
|
+
sig { returns(T::Array[::Parlour::RbsGenerator::Include]) }
|
1990
|
+
def includes; end
|
1991
|
+
|
1992
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#511
|
1993
|
+
sig { override.overridable.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void }
|
1994
|
+
def merge_into_self(others); end
|
1995
|
+
|
1996
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#493
|
1997
|
+
sig { override.overridable.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
1998
|
+
def mergeable?(others); end
|
1999
|
+
|
2000
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#100
|
2001
|
+
sig { params(object: T.untyped, block: T.proc.params(x: ::Parlour::RbsGenerator::Namespace).void).void }
|
2002
|
+
def path(object, &block); end
|
2003
|
+
|
2004
|
+
# @return [Array<RbsGenerator::TypeAlias>]
|
2005
|
+
#
|
2006
|
+
# source://sorbet-runtime/0.5.11690/lib/types/private/methods/_methods.rb#257
|
2007
|
+
def type_aliases(*args, **_arg1, &blk); end
|
2008
|
+
|
2009
|
+
private
|
2010
|
+
|
2011
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#545
|
2012
|
+
sig { overridable.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
2013
|
+
def generate_body(indent_level, options); end
|
2014
|
+
|
2015
|
+
# source://parlour//lib/parlour/rbs_generator/namespace.rb#621
|
2016
|
+
sig { params(object: ::Parlour::RbsGenerator::RbsObject).void }
|
2017
|
+
def move_next_comments(object); end
|
2018
|
+
end
|
2019
|
+
|
2020
|
+
# Represents a method parameter with a Sorbet type signature.
|
2021
|
+
#
|
2022
|
+
# source://parlour//lib/parlour/rbs_generator/parameter.rb#5
|
2023
|
+
class Parlour::RbsGenerator::Parameter
|
2024
|
+
extend T::Sig
|
2025
|
+
|
2026
|
+
# source://parlour//lib/parlour/rbs_generator/parameter.rb#37
|
2027
|
+
sig { params(name: ::String, type: T.nilable(T.any(::Parlour::Types::Type, ::String)), required: T::Boolean).void }
|
2028
|
+
def initialize(name, type: T.unsafe(nil), required: T.unsafe(nil)); end
|
2029
|
+
|
2030
|
+
# source://parlour//lib/parlour/rbs_generator/parameter.rb#56
|
2031
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2032
|
+
def ==(other); end
|
2033
|
+
|
2034
|
+
# source://parlour//lib/parlour/rbs_generator/parameter.rb#98
|
2035
|
+
sig { returns(::Symbol) }
|
2036
|
+
def kind; end
|
2037
|
+
|
2038
|
+
# source://parlour//lib/parlour/rbs_generator/parameter.rb#68
|
2039
|
+
sig { returns(::String) }
|
2040
|
+
def name; end
|
2041
|
+
|
2042
|
+
# source://parlour//lib/parlour/rbs_generator/parameter.rb#75
|
2043
|
+
sig { returns(::String) }
|
2044
|
+
def name_without_kind; end
|
2045
|
+
|
2046
|
+
# source://parlour//lib/parlour/rbs_generator/parameter.rb#92
|
2047
|
+
sig { returns(T::Boolean) }
|
2048
|
+
def required; end
|
2049
|
+
|
2050
|
+
# source://parlour//lib/parlour/rbs_generator/parameter.rb#119
|
2051
|
+
sig { returns(::String) }
|
2052
|
+
def to_rbs_param; end
|
2053
|
+
|
2054
|
+
# source://parlour//lib/parlour/rbs_generator/parameter.rb#87
|
2055
|
+
sig { returns(T.any(::Parlour::Types::Type, ::String)) }
|
2056
|
+
def type; end
|
2057
|
+
end
|
2058
|
+
|
2059
|
+
# A mapping of {kind} values to the characteristic prefixes each kind has.
|
2060
|
+
#
|
2061
|
+
# source://parlour//lib/parlour/rbs_generator/parameter.rb#109
|
2062
|
+
Parlour::RbsGenerator::Parameter::PREFIXES = T.let(T.unsafe(nil), Hash)
|
2063
|
+
|
2064
|
+
# An array of reserved keywords in RBS which may be used as parameter
|
2065
|
+
# names in standard Ruby.
|
2066
|
+
# TODO: probably incomplete
|
2067
|
+
#
|
2068
|
+
# source://parlour//lib/parlour/rbs_generator/parameter.rb#103
|
2069
|
+
Parlour::RbsGenerator::Parameter::RBS_KEYWORDS = T.let(T.unsafe(nil), Array)
|
2070
|
+
|
2071
|
+
# An abstract class which is subclassed by any classes which can generate
|
2072
|
+
# entire lines of an RBS, such as {Namespace} and {Method}. (As an example,
|
2073
|
+
# {Parameter} is _not_ a subclass because it does not generate lines, only
|
2074
|
+
# segments of definition lines.)
|
2075
|
+
#
|
2076
|
+
# @abstract
|
2077
|
+
#
|
2078
|
+
# source://parlour//lib/parlour/rbs_generator/rbs_object.rb#9
|
2079
|
+
class Parlour::RbsGenerator::RbsObject < ::Parlour::TypedObject
|
2080
|
+
abstract!
|
2081
|
+
|
2082
|
+
# source://parlour//lib/parlour/rbs_generator/rbs_object.rb#19
|
2083
|
+
sig { params(generator: ::Parlour::Generator, name: ::String).void }
|
2084
|
+
def initialize(generator, name); end
|
2085
|
+
|
2086
|
+
# source://parlour//lib/parlour/rbs_generator/rbs_object.rb#73
|
2087
|
+
sig { override.overridable.returns(::String) }
|
2088
|
+
def describe; end
|
2089
|
+
|
2090
|
+
# @abstract
|
2091
|
+
#
|
2092
|
+
# source://parlour//lib/parlour/rbs_generator/rbs_object.rb#42
|
2093
|
+
sig { abstract.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
2094
|
+
def generate_rbs(indent_level, options); end
|
2095
|
+
|
2096
|
+
# source://parlour//lib/parlour/rbs_generator/rbs_object.rb#28
|
2097
|
+
sig { returns(::Parlour::Generator) }
|
2098
|
+
def generator; end
|
2099
|
+
|
2100
|
+
# @abstract
|
2101
|
+
#
|
2102
|
+
# source://parlour//lib/parlour/rbs_generator/rbs_object.rb#70
|
2103
|
+
sig { abstract.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void }
|
2104
|
+
def merge_into_self(others); end
|
2105
|
+
|
2106
|
+
# @abstract
|
2107
|
+
#
|
2108
|
+
# source://parlour//lib/parlour/rbs_generator/rbs_object.rb#56
|
2109
|
+
sig { abstract.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
2110
|
+
def mergeable?(others); end
|
2111
|
+
end
|
2112
|
+
|
2113
|
+
# Represents a type alias.
|
2114
|
+
#
|
2115
|
+
# source://parlour//lib/parlour/rbs_generator/type_alias.rb#5
|
2116
|
+
class Parlour::RbsGenerator::TypeAlias < ::Parlour::RbsGenerator::RbsObject
|
2117
|
+
# source://parlour//lib/parlour/rbs_generator/type_alias.rb#18
|
2118
|
+
sig do
|
2119
|
+
params(
|
2120
|
+
generator: ::Parlour::Generator,
|
2121
|
+
name: ::String,
|
2122
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
2123
|
+
block: T.nilable(T.proc.params(x: ::Parlour::RbsGenerator::TypeAlias).void)
|
2124
|
+
).void
|
2125
|
+
end
|
2126
|
+
def initialize(generator, name:, type:, &block); end
|
2127
|
+
|
2128
|
+
# source://parlour//lib/parlour/rbs_generator/type_alias.rb#34
|
2129
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2130
|
+
def ==(other); end
|
2131
|
+
|
2132
|
+
# source://parlour//lib/parlour/rbs_generator/type_alias.rb#91
|
2133
|
+
sig { override.returns(::String) }
|
2134
|
+
def describe; end
|
2135
|
+
|
2136
|
+
# source://parlour//lib/parlour/rbs_generator/type_alias.rb#49
|
2137
|
+
sig { override.params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
2138
|
+
def generate_rbs(indent_level, options); end
|
2139
|
+
|
2140
|
+
# source://parlour//lib/parlour/rbs_generator/type_alias.rb#83
|
2141
|
+
sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).void }
|
2142
|
+
def merge_into_self(others); end
|
2143
|
+
|
2144
|
+
# source://parlour//lib/parlour/rbs_generator/type_alias.rb#66
|
2145
|
+
sig { override.params(others: T::Array[::Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
2146
|
+
def mergeable?(others); end
|
2147
|
+
|
2148
|
+
# source://parlour//lib/parlour/rbs_generator/type_alias.rb#26
|
2149
|
+
sig { returns(T.any(::Parlour::Types::Type, ::String)) }
|
2150
|
+
def type; end
|
2151
|
+
end
|
2152
|
+
|
2153
|
+
# source://parlour//lib/parlour/type_loader.rb#7
|
2154
|
+
module Parlour::TypeLoader
|
2155
|
+
extend T::Sig
|
2156
|
+
|
2157
|
+
class << self
|
2158
|
+
# source://parlour//lib/parlour/type_loader.rb#29
|
2159
|
+
sig do
|
2160
|
+
params(
|
2161
|
+
filename: ::String,
|
2162
|
+
generator: T.nilable(::Parlour::RbiGenerator)
|
2163
|
+
).returns(::Parlour::RbiGenerator::Namespace)
|
2164
|
+
end
|
2165
|
+
def load_file(filename, generator: T.unsafe(nil)); end
|
2166
|
+
|
2167
|
+
# source://parlour//lib/parlour/type_loader.rb#54
|
2168
|
+
sig do
|
2169
|
+
params(
|
2170
|
+
root: ::String,
|
2171
|
+
inclusions: T::Array[::String],
|
2172
|
+
exclusions: T::Array[::String],
|
2173
|
+
generator: T.nilable(::Parlour::RbiGenerator)
|
2174
|
+
).returns(::Parlour::RbiGenerator::Namespace)
|
2175
|
+
end
|
2176
|
+
def load_project(root, inclusions: T.unsafe(nil), exclusions: T.unsafe(nil), generator: T.unsafe(nil)); end
|
2177
|
+
|
2178
|
+
# TODO: make this into a class which stores configuration and passes it to
|
2179
|
+
# all typeparsers
|
2180
|
+
#
|
2181
|
+
# source://parlour//lib/parlour/type_loader.rb#20
|
2182
|
+
sig do
|
2183
|
+
params(
|
2184
|
+
source: ::String,
|
2185
|
+
filename: T.nilable(::String),
|
2186
|
+
generator: T.nilable(::Parlour::RbiGenerator)
|
2187
|
+
).returns(::Parlour::RbiGenerator::Namespace)
|
2188
|
+
end
|
2189
|
+
def load_source(source, filename = T.unsafe(nil), generator: T.unsafe(nil)); end
|
2190
|
+
end
|
2191
|
+
end
|
2192
|
+
|
2193
|
+
# Parses Ruby source to find Sorbet type signatures.
|
2194
|
+
#
|
2195
|
+
# source://parlour//lib/parlour/type_parser.rb#17
|
2196
|
+
class Parlour::TypeParser
|
2197
|
+
extend T::Sig
|
2198
|
+
|
2199
|
+
# source://parlour//lib/parlour/type_parser.rb#95
|
2200
|
+
sig do
|
2201
|
+
params(
|
2202
|
+
ast: ::Parser::AST::Node,
|
2203
|
+
unknown_node_errors: T::Boolean,
|
2204
|
+
generator: T.nilable(::Parlour::RbiGenerator)
|
2205
|
+
).void
|
2206
|
+
end
|
2207
|
+
def initialize(ast, unknown_node_errors: T.unsafe(nil), generator: T.unsafe(nil)); end
|
2208
|
+
|
2209
|
+
# source://parlour//lib/parlour/type_parser.rb#119
|
2210
|
+
sig { returns(::Parser::AST::Node) }
|
2211
|
+
def ast; end
|
2212
|
+
|
2213
|
+
# @return [Parser::AST::Node]
|
2214
|
+
#
|
2215
|
+
# source://parlour//lib/parlour/type_parser.rb#119
|
2216
|
+
def ast=(_arg0); end
|
2217
|
+
|
2218
|
+
# source://parlour//lib/parlour/type_parser.rb#128
|
2219
|
+
sig { returns(::Parlour::RbiGenerator) }
|
2220
|
+
def generator; end
|
2221
|
+
|
2222
|
+
# @return [RbiGenerator]
|
2223
|
+
#
|
2224
|
+
# source://parlour//lib/parlour/type_parser.rb#128
|
2225
|
+
def generator=(_arg0); end
|
2226
|
+
|
2227
|
+
# Parses the entire source file and returns the resulting root namespace.
|
2228
|
+
#
|
2229
|
+
# source://parlour//lib/parlour/type_parser.rb#134
|
2230
|
+
sig { returns(::Parlour::RbiGenerator::Namespace) }
|
2231
|
+
def parse_all; end
|
2232
|
+
|
2233
|
+
# source://parlour//lib/parlour/type_parser.rb#636
|
2234
|
+
sig do
|
2235
|
+
params(
|
2236
|
+
path: ::Parlour::TypeParser::NodePath,
|
2237
|
+
is_within_eigenclass: T::Boolean
|
2238
|
+
).returns(T::Array[::Parlour::RbiGenerator::Method])
|
2239
|
+
end
|
2240
|
+
def parse_method_into_methods(path, is_within_eigenclass: T.unsafe(nil)); end
|
2241
|
+
|
2242
|
+
# source://parlour//lib/parlour/type_parser.rb#739
|
2243
|
+
sig { params(node: ::Parser::AST::Node).returns(::Parlour::Types::Type) }
|
2244
|
+
def parse_node_to_type(node); end
|
2245
|
+
|
2246
|
+
# Given a path to a node in the AST, parses the object definitions it
|
2247
|
+
# represents and returns it, recursing to any child namespaces and parsing
|
2248
|
+
# any methods within.
|
2249
|
+
#
|
2250
|
+
# If the node directly represents several nodes, such as being a
|
2251
|
+
# (begin ...) node, they are all returned.
|
2252
|
+
#
|
2253
|
+
# source://parlour//lib/parlour/type_parser.rb#152
|
2254
|
+
sig do
|
2255
|
+
params(
|
2256
|
+
path: ::Parlour::TypeParser::NodePath,
|
2257
|
+
is_within_eigenclass: T::Boolean
|
2258
|
+
).returns(T::Array[::Parlour::RbiGenerator::RbiObject])
|
2259
|
+
end
|
2260
|
+
def parse_path_to_object(path, is_within_eigenclass: T.unsafe(nil)); end
|
2261
|
+
|
2262
|
+
# source://parlour//lib/parlour/type_parser.rb#487
|
2263
|
+
sig do
|
2264
|
+
params(
|
2265
|
+
path: ::Parlour::TypeParser::NodePath,
|
2266
|
+
is_within_eigenclass: T::Boolean
|
2267
|
+
).returns(T::Array[::Parlour::RbiGenerator::Method])
|
2268
|
+
end
|
2269
|
+
def parse_sig_into_methods(path, is_within_eigenclass: T.unsafe(nil)); end
|
2270
|
+
|
2271
|
+
# source://parlour//lib/parlour/type_parser.rb#409
|
2272
|
+
sig { params(path: ::Parlour::TypeParser::NodePath).returns(::Parlour::TypeParser::IntermediateSig) }
|
2273
|
+
def parse_sig_into_sig(path); end
|
2274
|
+
|
2275
|
+
# source://parlour//lib/parlour/type_parser.rb#124
|
2276
|
+
sig { returns(T::Boolean) }
|
2277
|
+
def unknown_node_errors; end
|
2278
|
+
|
2279
|
+
protected
|
2280
|
+
|
2281
|
+
# source://parlour//lib/parlour/type_parser.rb#956
|
2282
|
+
sig { params(node: T.nilable(::Parser::AST::Node), modifier: ::Symbol).returns(T::Boolean) }
|
2283
|
+
def body_has_modifier?(node, modifier); end
|
2284
|
+
|
2285
|
+
# source://parlour//lib/parlour/type_parser.rb#971
|
2286
|
+
sig { params(node: ::Parser::AST::Node).returns([T::Array[::String], T::Array[::String]]) }
|
2287
|
+
def body_includes_and_extends(node); end
|
2288
|
+
|
2289
|
+
# source://parlour//lib/parlour/type_parser.rb#896
|
2290
|
+
sig { params(node: T.nilable(::Parser::AST::Node)).returns(T::Array[::Symbol]) }
|
2291
|
+
def constant_names(node); end
|
2292
|
+
|
2293
|
+
# source://parlour//lib/parlour/type_parser.rb#938
|
2294
|
+
sig { params(node: T.nilable(::Parser::AST::Node)).returns(T.nilable(::String)) }
|
2295
|
+
def node_to_s(node); end
|
2296
|
+
|
2297
|
+
# @raise [ParseError.new(buffer, range)]
|
2298
|
+
#
|
2299
|
+
# source://parlour//lib/parlour/type_parser.rb#995
|
2300
|
+
sig { params(desc: ::String, node: T.any(::Parlour::TypeParser::NodePath, ::Parser::AST::Node)).returns(T.noreturn) }
|
2301
|
+
def parse_err(desc, node); end
|
2302
|
+
|
2303
|
+
# source://parlour//lib/parlour/type_parser.rb#921
|
2304
|
+
sig { params(path: ::Parlour::TypeParser::NodePath).returns(T::Boolean) }
|
2305
|
+
def previous_sibling_sig_node?(path); end
|
2306
|
+
|
2307
|
+
# source://parlour//lib/parlour/type_parser.rb#908
|
2308
|
+
sig { params(node: ::Parser::AST::Node).returns(T::Boolean) }
|
2309
|
+
def sig_node?(node); end
|
2310
|
+
|
2311
|
+
# source://parlour//lib/parlour/type_parser.rb#878
|
2312
|
+
sig { params(msg: ::String, node: ::Parser::AST::Node).void }
|
2313
|
+
def warning(msg, node); end
|
2314
|
+
|
2315
|
+
# @raise [ArgumentError]
|
2316
|
+
#
|
2317
|
+
# source://parlour//lib/parlour/type_parser.rb#1028
|
2318
|
+
sig do
|
2319
|
+
type_parameters(:A, :B)
|
2320
|
+
.params(
|
2321
|
+
a: T::Array[T.type_parameter(:A)],
|
2322
|
+
fa: T.proc.params(item: T.type_parameter(:A)).returns(T.untyped),
|
2323
|
+
b: T::Array[T.type_parameter(:B)],
|
2324
|
+
fb: T.proc.params(item: T.type_parameter(:B)).returns(T.untyped)
|
2325
|
+
).returns(T::Array[[T.type_parameter(:A), T.type_parameter(:B)]])
|
2326
|
+
end
|
2327
|
+
def zip_by(a, fa, b, fb); end
|
2328
|
+
|
2329
|
+
class << self
|
2330
|
+
# source://parlour//lib/parlour/type_parser.rb#108
|
2331
|
+
sig do
|
2332
|
+
params(
|
2333
|
+
filename: ::String,
|
2334
|
+
source: ::String,
|
2335
|
+
generator: T.nilable(::Parlour::RbiGenerator)
|
2336
|
+
).returns(::Parlour::TypeParser)
|
2337
|
+
end
|
2338
|
+
def from_source(filename, source, generator: T.unsafe(nil)); end
|
2339
|
+
|
2340
|
+
# source://parlour//lib/parlour/type_parser.rb#728
|
2341
|
+
sig { params(str: ::String).returns(::Parlour::Types::Type) }
|
2342
|
+
def parse_single_type(str); end
|
2343
|
+
end
|
2344
|
+
end
|
2345
|
+
|
2346
|
+
# A parsed sig, not associated with a method.
|
2347
|
+
#
|
2348
|
+
# source://parlour//lib/parlour/type_parser.rb#390
|
2349
|
+
class Parlour::TypeParser::IntermediateSig < ::T::Struct
|
2350
|
+
prop :type_parameters, T.nilable(T::Array[::Symbol])
|
2351
|
+
prop :overridable, T::Boolean
|
2352
|
+
prop :override, T::Boolean
|
2353
|
+
prop :abstract, T::Boolean
|
2354
|
+
prop :final, T::Boolean
|
2355
|
+
prop :return_type, T.nilable(::String)
|
2356
|
+
prop :params, T.nilable(T::Array[::Parser::AST::Node])
|
2357
|
+
|
2358
|
+
class << self
|
2359
|
+
# source://sorbet-runtime/0.5.11690/lib/types/struct.rb#13
|
2360
|
+
def inherited(s); end
|
2361
|
+
end
|
2362
|
+
end
|
2363
|
+
|
2364
|
+
# Represents a path of indices which can be traversed to reach a specific
|
2365
|
+
# node in an AST.
|
2366
|
+
#
|
2367
|
+
# source://parlour//lib/parlour/type_parser.rb#20
|
2368
|
+
class Parlour::TypeParser::NodePath
|
2369
|
+
extend T::Sig
|
2370
|
+
|
2371
|
+
# source://parlour//lib/parlour/type_parser.rb#31
|
2372
|
+
sig { params(indices: T::Array[::Integer]).void }
|
2373
|
+
def initialize(indices); end
|
2374
|
+
|
2375
|
+
# source://parlour//lib/parlour/type_parser.rb#48
|
2376
|
+
sig { params(index: ::Integer).returns(::Parlour::TypeParser::NodePath) }
|
2377
|
+
def child(index); end
|
2378
|
+
|
2379
|
+
# source://parlour//lib/parlour/type_parser.rb#25
|
2380
|
+
sig { returns(T::Array[::Integer]) }
|
2381
|
+
def indices; end
|
2382
|
+
|
2383
|
+
# source://parlour//lib/parlour/type_parser.rb#37
|
2384
|
+
sig { returns(::Parlour::TypeParser::NodePath) }
|
2385
|
+
def parent; end
|
2386
|
+
|
2387
|
+
# source://parlour//lib/parlour/type_parser.rb#57
|
2388
|
+
sig { params(offset: ::Integer).returns(::Parlour::TypeParser::NodePath) }
|
2389
|
+
def sibling(offset); end
|
2390
|
+
|
2391
|
+
# source://parlour//lib/parlour/type_parser.rb#74
|
2392
|
+
sig { params(start: ::Parser::AST::Node).returns(::Parser::AST::Node) }
|
2393
|
+
def traverse(start); end
|
2394
|
+
end
|
2395
|
+
|
2396
|
+
# A generic superclass of all objects which form part of type definitions in,
|
2397
|
+
# specific formats, such as RbiObject and RbsObject.
|
2398
|
+
#
|
2399
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
2400
|
+
#
|
2401
|
+
# source://parlour//lib/parlour/typed_object.rb#5
|
2402
|
+
class Parlour::TypedObject
|
2403
|
+
extend T::Sig
|
2404
|
+
extend T::Helpers
|
2405
|
+
|
2406
|
+
abstract!
|
2407
|
+
|
2408
|
+
# source://parlour//lib/parlour/typed_object.rb#12
|
2409
|
+
sig { params(name: ::String).void }
|
2410
|
+
def initialize(name); end
|
2411
|
+
|
2412
|
+
# source://parlour//lib/parlour/typed_object.rb#50
|
2413
|
+
sig { params(comment: T.any(::String, T::Array[::String])).void }
|
2414
|
+
def add_comment(comment); end
|
2415
|
+
|
2416
|
+
# @param comment [String, Array<String>]
|
2417
|
+
# @return [void]
|
2418
|
+
#
|
2419
|
+
# source://sorbet-runtime/0.5.11690/lib/types/private/methods/_methods.rb#257
|
2420
|
+
def add_comments(*args, **_arg1, &blk); end
|
2421
|
+
|
2422
|
+
# source://parlour//lib/parlour/typed_object.rb#32
|
2423
|
+
sig { returns(T::Array[::String]) }
|
2424
|
+
def comments; end
|
2425
|
+
|
2426
|
+
# @abstract
|
2427
|
+
#
|
2428
|
+
# source://parlour//lib/parlour/typed_object.rb#66
|
2429
|
+
sig { abstract.returns(::String) }
|
2430
|
+
def describe; end
|
2431
|
+
|
2432
|
+
# source://parlour//lib/parlour/typed_object.rb#21
|
2433
|
+
sig { returns(T.nilable(::Parlour::Plugin)) }
|
2434
|
+
def generated_by; end
|
2435
|
+
|
2436
|
+
# source://parlour//lib/parlour/typed_object.rb#26
|
2437
|
+
sig { returns(::String) }
|
2438
|
+
def name; end
|
2439
|
+
|
2440
|
+
protected
|
2441
|
+
|
2442
|
+
# source://parlour//lib/parlour/typed_object.rb#81
|
2443
|
+
sig { params(indent_level: ::Integer, options: ::Parlour::Options).returns(T::Array[::String]) }
|
2444
|
+
def generate_comments(indent_level, options); end
|
2445
|
+
end
|
2446
|
+
|
2447
|
+
# Contains structured types which can be used in type signatures.
|
2448
|
+
#
|
2449
|
+
# source://parlour//lib/parlour/types.rb#5
|
2450
|
+
module Parlour::Types; end
|
2451
|
+
|
2452
|
+
# An array with known element types.
|
2453
|
+
#
|
2454
|
+
# source://parlour//lib/parlour/types.rb#269
|
2455
|
+
class Parlour::Types::Array < ::Parlour::Types::SingleElementCollection
|
2456
|
+
# source://parlour//lib/parlour/types.rb#276
|
2457
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2458
|
+
def ==(other); end
|
2459
|
+
|
2460
|
+
# source://parlour//lib/parlour/types.rb#271
|
2461
|
+
sig { override.returns(::String) }
|
2462
|
+
def collection_name; end
|
2463
|
+
end
|
2464
|
+
|
2465
|
+
# Type for a boolean.
|
2466
|
+
#
|
2467
|
+
# source://parlour//lib/parlour/types.rb#435
|
2468
|
+
class Parlour::Types::Boolean < ::Parlour::Types::Type
|
2469
|
+
# source://parlour//lib/parlour/types.rb#437
|
2470
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2471
|
+
def ==(other); end
|
2472
|
+
|
2473
|
+
# source://parlour//lib/parlour/types.rb#452
|
2474
|
+
sig { override.returns(::String) }
|
2475
|
+
def describe; end
|
2476
|
+
|
2477
|
+
# source://parlour//lib/parlour/types.rb#442
|
2478
|
+
sig { override.returns(::String) }
|
2479
|
+
def generate_rbi; end
|
2480
|
+
|
2481
|
+
# source://parlour//lib/parlour/types.rb#447
|
2482
|
+
sig { override.returns(::String) }
|
2483
|
+
def generate_rbs; end
|
2484
|
+
end
|
2485
|
+
|
2486
|
+
# A type which represents the class of a type, rather than an instance.
|
2487
|
+
# For example, "String" means an instance of String, but "Class(String)"
|
2488
|
+
# means the actual String class.
|
2489
|
+
#
|
2490
|
+
# source://parlour//lib/parlour/types.rb#404
|
2491
|
+
class Parlour::Types::Class < ::Parlour::Types::Type
|
2492
|
+
# source://parlour//lib/parlour/types.rb#406
|
2493
|
+
sig { params(type: T.any(::Parlour::Types::Type, ::String)).void }
|
2494
|
+
def initialize(type); end
|
2495
|
+
|
2496
|
+
# source://parlour//lib/parlour/types.rb#411
|
2497
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2498
|
+
def ==(other); end
|
2499
|
+
|
2500
|
+
# source://parlour//lib/parlour/types.rb#429
|
2501
|
+
sig { override.returns(::String) }
|
2502
|
+
def describe; end
|
2503
|
+
|
2504
|
+
# source://parlour//lib/parlour/types.rb#419
|
2505
|
+
sig { override.returns(::String) }
|
2506
|
+
def generate_rbi; end
|
2507
|
+
|
2508
|
+
# source://parlour//lib/parlour/types.rb#424
|
2509
|
+
sig { override.returns(::String) }
|
2510
|
+
def generate_rbs; end
|
2511
|
+
|
2512
|
+
# source://parlour//lib/parlour/types.rb#416
|
2513
|
+
sig { returns(::Parlour::Types::Type) }
|
2514
|
+
def type; end
|
2515
|
+
end
|
2516
|
+
|
2517
|
+
# An enumerable with known element types.
|
2518
|
+
#
|
2519
|
+
# source://parlour//lib/parlour/types.rb#308
|
2520
|
+
class Parlour::Types::Enumerable < ::Parlour::Types::SingleElementCollection
|
2521
|
+
# source://parlour//lib/parlour/types.rb#315
|
2522
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2523
|
+
def ==(other); end
|
2524
|
+
|
2525
|
+
# source://parlour//lib/parlour/types.rb#310
|
2526
|
+
sig { override.returns(::String) }
|
2527
|
+
def collection_name; end
|
2528
|
+
end
|
2529
|
+
|
2530
|
+
# An enumerator with known element types.
|
2531
|
+
#
|
2532
|
+
# source://parlour//lib/parlour/types.rb#321
|
2533
|
+
class Parlour::Types::Enumerator < ::Parlour::Types::SingleElementCollection
|
2534
|
+
# source://parlour//lib/parlour/types.rb#328
|
2535
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2536
|
+
def ==(other); end
|
2537
|
+
|
2538
|
+
# source://parlour//lib/parlour/types.rb#323
|
2539
|
+
sig { override.returns(::String) }
|
2540
|
+
def collection_name; end
|
2541
|
+
end
|
2542
|
+
|
2543
|
+
# A user-defined generic class with an arbitrary number of type
|
2544
|
+
# parameters. This class assumes at least one type_param is
|
2545
|
+
# provided, otherwise output will have empty type param lists.
|
2546
|
+
#
|
2547
|
+
# source://parlour//lib/parlour/types.rb#202
|
2548
|
+
class Parlour::Types::Generic < ::Parlour::Types::Type
|
2549
|
+
# source://parlour//lib/parlour/types.rb#204
|
2550
|
+
sig do
|
2551
|
+
params(
|
2552
|
+
type: T.any(::Parlour::Types::Type, ::String),
|
2553
|
+
type_params: T::Array[T.any(::Parlour::Types::Type, ::String)]
|
2554
|
+
).void
|
2555
|
+
end
|
2556
|
+
def initialize(type, type_params); end
|
2557
|
+
|
2558
|
+
# source://parlour//lib/parlour/types.rb#210
|
2559
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2560
|
+
def ==(other); end
|
2561
|
+
|
2562
|
+
# source://parlour//lib/parlour/types.rb#233
|
2563
|
+
sig { override.returns(::String) }
|
2564
|
+
def describe; end
|
2565
|
+
|
2566
|
+
# source://parlour//lib/parlour/types.rb#223
|
2567
|
+
sig { override.returns(::String) }
|
2568
|
+
def generate_rbi; end
|
2569
|
+
|
2570
|
+
# source://parlour//lib/parlour/types.rb#228
|
2571
|
+
sig { override.returns(::String) }
|
2572
|
+
def generate_rbs; end
|
2573
|
+
|
2574
|
+
# source://parlour//lib/parlour/types.rb#217
|
2575
|
+
sig { returns(::Parlour::Types::Type) }
|
2576
|
+
def type; end
|
2577
|
+
|
2578
|
+
# source://parlour//lib/parlour/types.rb#220
|
2579
|
+
sig { returns(T::Array[::Parlour::Types::Type]) }
|
2580
|
+
def type_params; end
|
2581
|
+
end
|
2582
|
+
|
2583
|
+
# A hash with known key and value types.
|
2584
|
+
#
|
2585
|
+
# source://parlour//lib/parlour/types.rb#334
|
2586
|
+
class Parlour::Types::Hash < ::Parlour::Types::Type
|
2587
|
+
# source://parlour//lib/parlour/types.rb#336
|
2588
|
+
sig { params(key: T.any(::Parlour::Types::Type, ::String), value: T.any(::Parlour::Types::Type, ::String)).void }
|
2589
|
+
def initialize(key, value); end
|
2590
|
+
|
2591
|
+
# source://parlour//lib/parlour/types.rb#342
|
2592
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2593
|
+
def ==(other); end
|
2594
|
+
|
2595
|
+
# source://parlour//lib/parlour/types.rb#363
|
2596
|
+
sig { override.returns(::String) }
|
2597
|
+
def describe; end
|
2598
|
+
|
2599
|
+
# source://parlour//lib/parlour/types.rb#353
|
2600
|
+
sig { override.returns(::String) }
|
2601
|
+
def generate_rbi; end
|
2602
|
+
|
2603
|
+
# source://parlour//lib/parlour/types.rb#358
|
2604
|
+
sig { override.returns(::String) }
|
2605
|
+
def generate_rbs; end
|
2606
|
+
|
2607
|
+
# source://parlour//lib/parlour/types.rb#347
|
2608
|
+
sig { returns(::Parlour::Types::Type) }
|
2609
|
+
def key; end
|
2610
|
+
|
2611
|
+
# source://parlour//lib/parlour/types.rb#350
|
2612
|
+
sig { returns(::Parlour::Types::Type) }
|
2613
|
+
def value; end
|
2614
|
+
end
|
2615
|
+
|
2616
|
+
# A type which matches all of the wrapped types.
|
2617
|
+
#
|
2618
|
+
# source://parlour//lib/parlour/types.rb#138
|
2619
|
+
class Parlour::Types::Intersection < ::Parlour::Types::Type
|
2620
|
+
# source://parlour//lib/parlour/types.rb#140
|
2621
|
+
sig { params(types: T::Array[T.any(::Parlour::Types::Type, ::String)]).void }
|
2622
|
+
def initialize(types); end
|
2623
|
+
|
2624
|
+
# source://parlour//lib/parlour/types.rb#145
|
2625
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2626
|
+
def ==(other); end
|
2627
|
+
|
2628
|
+
# source://parlour//lib/parlour/types.rb#163
|
2629
|
+
sig { override.returns(::String) }
|
2630
|
+
def describe; end
|
2631
|
+
|
2632
|
+
# source://parlour//lib/parlour/types.rb#153
|
2633
|
+
sig { override.returns(::String) }
|
2634
|
+
def generate_rbi; end
|
2635
|
+
|
2636
|
+
# source://parlour//lib/parlour/types.rb#158
|
2637
|
+
sig { override.returns(::String) }
|
2638
|
+
def generate_rbs; end
|
2639
|
+
|
2640
|
+
# source://parlour//lib/parlour/types.rb#150
|
2641
|
+
sig { returns(T::Array[::Parlour::Types::Type]) }
|
2642
|
+
def types; end
|
2643
|
+
end
|
2644
|
+
|
2645
|
+
# A type which can be either the wrapped type, or nil.
|
2646
|
+
#
|
2647
|
+
# source://parlour//lib/parlour/types.rb#76
|
2648
|
+
class Parlour::Types::Nilable < ::Parlour::Types::Type
|
2649
|
+
# source://parlour//lib/parlour/types.rb#78
|
2650
|
+
sig { params(type: T.any(::Parlour::Types::Type, ::String)).void }
|
2651
|
+
def initialize(type); end
|
2652
|
+
|
2653
|
+
# source://parlour//lib/parlour/types.rb#83
|
2654
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2655
|
+
def ==(other); end
|
2656
|
+
|
2657
|
+
# source://parlour//lib/parlour/types.rb#101
|
2658
|
+
sig { override.returns(::String) }
|
2659
|
+
def describe; end
|
2660
|
+
|
2661
|
+
# source://parlour//lib/parlour/types.rb#91
|
2662
|
+
sig { override.returns(::String) }
|
2663
|
+
def generate_rbi; end
|
2664
|
+
|
2665
|
+
# source://parlour//lib/parlour/types.rb#96
|
2666
|
+
sig { override.returns(::String) }
|
2667
|
+
def generate_rbs; end
|
2668
|
+
|
2669
|
+
# source://parlour//lib/parlour/types.rb#88
|
2670
|
+
sig { returns(::Parlour::Types::Type) }
|
2671
|
+
def type; end
|
2672
|
+
end
|
2673
|
+
|
2674
|
+
# A type which can be called as a function.
|
2675
|
+
#
|
2676
|
+
# source://parlour//lib/parlour/types.rb#505
|
2677
|
+
class Parlour::Types::Proc < ::Parlour::Types::Type
|
2678
|
+
# source://parlour//lib/parlour/types.rb#533
|
2679
|
+
sig do
|
2680
|
+
params(
|
2681
|
+
parameters: T::Array[::Parlour::Types::Proc::Parameter],
|
2682
|
+
return_type: T.nilable(T.any(::Parlour::Types::Type, ::String))
|
2683
|
+
).void
|
2684
|
+
end
|
2685
|
+
def initialize(parameters, return_type); end
|
2686
|
+
|
2687
|
+
# source://parlour//lib/parlour/types.rb#539
|
2688
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2689
|
+
def ==(other); end
|
2690
|
+
|
2691
|
+
# source://parlour//lib/parlour/types.rb#568
|
2692
|
+
sig { override.returns(::String) }
|
2693
|
+
def describe; end
|
2694
|
+
|
2695
|
+
# source://parlour//lib/parlour/types.rb#550
|
2696
|
+
sig { override.returns(::String) }
|
2697
|
+
def generate_rbi; end
|
2698
|
+
|
2699
|
+
# source://parlour//lib/parlour/types.rb#560
|
2700
|
+
sig { override.returns(::String) }
|
2701
|
+
def generate_rbs; end
|
2702
|
+
|
2703
|
+
# source://parlour//lib/parlour/types.rb#544
|
2704
|
+
sig { returns(T::Array[::Parlour::Types::Proc::Parameter]) }
|
2705
|
+
def parameters; end
|
2706
|
+
|
2707
|
+
# source://parlour//lib/parlour/types.rb#547
|
2708
|
+
sig { returns(T.nilable(::Parlour::Types::Type)) }
|
2709
|
+
def return_type; end
|
2710
|
+
end
|
2711
|
+
|
2712
|
+
# A parameter to a proc.
|
2713
|
+
#
|
2714
|
+
# source://parlour//lib/parlour/types.rb#506
|
2715
|
+
class Parlour::Types::Proc::Parameter
|
2716
|
+
extend T::Sig
|
2717
|
+
|
2718
|
+
# source://parlour//lib/parlour/types.rb#510
|
2719
|
+
sig { params(name: ::String, type: T.any(::Parlour::Types::Type, ::String), default: T.nilable(::String)).void }
|
2720
|
+
def initialize(name, type, default = T.unsafe(nil)); end
|
2721
|
+
|
2722
|
+
# source://parlour//lib/parlour/types.rb#526
|
2723
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2724
|
+
def ==(other); end
|
2725
|
+
|
2726
|
+
# source://parlour//lib/parlour/types.rb#523
|
2727
|
+
sig { returns(T.nilable(::String)) }
|
2728
|
+
def default; end
|
2729
|
+
|
2730
|
+
# source://parlour//lib/parlour/types.rb#517
|
2731
|
+
sig { returns(::String) }
|
2732
|
+
def name; end
|
2733
|
+
|
2734
|
+
# source://parlour//lib/parlour/types.rb#520
|
2735
|
+
sig { returns(::Parlour::Types::Type) }
|
2736
|
+
def type; end
|
2737
|
+
end
|
2738
|
+
|
2739
|
+
# A range with known element types.
|
2740
|
+
#
|
2741
|
+
# source://parlour//lib/parlour/types.rb#295
|
2742
|
+
class Parlour::Types::Range < ::Parlour::Types::SingleElementCollection
|
2743
|
+
# source://parlour//lib/parlour/types.rb#302
|
2744
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2745
|
+
def ==(other); end
|
2746
|
+
|
2747
|
+
# source://parlour//lib/parlour/types.rb#297
|
2748
|
+
sig { override.returns(::String) }
|
2749
|
+
def collection_name; end
|
2750
|
+
end
|
2751
|
+
|
2752
|
+
# A basic type as a raw string.
|
2753
|
+
#
|
2754
|
+
# source://parlour//lib/parlour/types.rb#45
|
2755
|
+
class Parlour::Types::Raw < ::Parlour::Types::Type
|
2756
|
+
# source://parlour//lib/parlour/types.rb#47
|
2757
|
+
sig { params(str: ::String).void }
|
2758
|
+
def initialize(str); end
|
2759
|
+
|
2760
|
+
# source://parlour//lib/parlour/types.rb#55
|
2761
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2762
|
+
def ==(other); end
|
2763
|
+
|
2764
|
+
# source://parlour//lib/parlour/types.rb#70
|
2765
|
+
sig { override.returns(::String) }
|
2766
|
+
def describe; end
|
2767
|
+
|
2768
|
+
# source://parlour//lib/parlour/types.rb#60
|
2769
|
+
sig { override.returns(::String) }
|
2770
|
+
def generate_rbi; end
|
2771
|
+
|
2772
|
+
# source://parlour//lib/parlour/types.rb#65
|
2773
|
+
sig { override.returns(::String) }
|
2774
|
+
def generate_rbs; end
|
2775
|
+
|
2776
|
+
# source://parlour//lib/parlour/types.rb#52
|
2777
|
+
sig { returns(::String) }
|
2778
|
+
def str; end
|
2779
|
+
end
|
2780
|
+
|
2781
|
+
# A record/shape; a hash with a fixed set of keys with given types.
|
2782
|
+
#
|
2783
|
+
# source://parlour//lib/parlour/types.rb#369
|
2784
|
+
class Parlour::Types::Record < ::Parlour::Types::Type
|
2785
|
+
# source://parlour//lib/parlour/types.rb#371
|
2786
|
+
sig { params(keys_to_types: T::Hash[::Symbol, T.any(::Parlour::Types::Type, ::String)]).void }
|
2787
|
+
def initialize(keys_to_types); end
|
2788
|
+
|
2789
|
+
# source://parlour//lib/parlour/types.rb#378
|
2790
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2791
|
+
def ==(other); end
|
2792
|
+
|
2793
|
+
# source://parlour//lib/parlour/types.rb#396
|
2794
|
+
sig { override.returns(::String) }
|
2795
|
+
def describe; end
|
2796
|
+
|
2797
|
+
# source://parlour//lib/parlour/types.rb#386
|
2798
|
+
sig { override.returns(::String) }
|
2799
|
+
def generate_rbi; end
|
2800
|
+
|
2801
|
+
# source://parlour//lib/parlour/types.rb#391
|
2802
|
+
sig { override.returns(::String) }
|
2803
|
+
def generate_rbs; end
|
2804
|
+
|
2805
|
+
# source://parlour//lib/parlour/types.rb#383
|
2806
|
+
sig { returns(T::Hash[::Symbol, ::Parlour::Types::Type]) }
|
2807
|
+
def keys_to_types; end
|
2808
|
+
end
|
2809
|
+
|
2810
|
+
# Type equivalent to the receiver.
|
2811
|
+
#
|
2812
|
+
# source://parlour//lib/parlour/types.rb#458
|
2813
|
+
class Parlour::Types::Self < ::Parlour::Types::Type
|
2814
|
+
# source://parlour//lib/parlour/types.rb#460
|
2815
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2816
|
+
def ==(other); end
|
2817
|
+
|
2818
|
+
# source://parlour//lib/parlour/types.rb#475
|
2819
|
+
sig { override.returns(::String) }
|
2820
|
+
def describe; end
|
2821
|
+
|
2822
|
+
# source://parlour//lib/parlour/types.rb#465
|
2823
|
+
sig { override.returns(::String) }
|
2824
|
+
def generate_rbi; end
|
2825
|
+
|
2826
|
+
# source://parlour//lib/parlour/types.rb#470
|
2827
|
+
sig { override.returns(::String) }
|
2828
|
+
def generate_rbs; end
|
2829
|
+
end
|
2830
|
+
|
2831
|
+
# A set with known element types.
|
2832
|
+
#
|
2833
|
+
# source://parlour//lib/parlour/types.rb#282
|
2834
|
+
class Parlour::Types::Set < ::Parlour::Types::SingleElementCollection
|
2835
|
+
# source://parlour//lib/parlour/types.rb#289
|
2836
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2837
|
+
def ==(other); end
|
2838
|
+
|
2839
|
+
# source://parlour//lib/parlour/types.rb#284
|
2840
|
+
sig { override.returns(::String) }
|
2841
|
+
def collection_name; end
|
2842
|
+
end
|
2843
|
+
|
2844
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
2845
|
+
#
|
2846
|
+
# source://parlour//lib/parlour/types.rb#238
|
2847
|
+
class Parlour::Types::SingleElementCollection < ::Parlour::Types::Type
|
2848
|
+
abstract!
|
2849
|
+
|
2850
|
+
# source://parlour//lib/parlour/types.rb#242
|
2851
|
+
sig { params(element: T.any(::Parlour::Types::Type, ::String)).void }
|
2852
|
+
def initialize(element); end
|
2853
|
+
|
2854
|
+
# @abstract
|
2855
|
+
#
|
2856
|
+
# source://parlour//lib/parlour/types.rb#250
|
2857
|
+
sig { abstract.returns(::String) }
|
2858
|
+
def collection_name; end
|
2859
|
+
|
2860
|
+
# source://parlour//lib/parlour/types.rb#263
|
2861
|
+
sig { override.returns(::String) }
|
2862
|
+
def describe; end
|
2863
|
+
|
2864
|
+
# source://parlour//lib/parlour/types.rb#247
|
2865
|
+
sig { returns(::Parlour::Types::Type) }
|
2866
|
+
def element; end
|
2867
|
+
|
2868
|
+
# source://parlour//lib/parlour/types.rb#253
|
2869
|
+
sig { override.returns(::String) }
|
2870
|
+
def generate_rbi; end
|
2871
|
+
|
2872
|
+
# source://parlour//lib/parlour/types.rb#258
|
2873
|
+
sig { override.returns(::String) }
|
2874
|
+
def generate_rbs; end
|
2875
|
+
end
|
2876
|
+
|
2877
|
+
# A fixed-length array of items, each with a known type.
|
2878
|
+
#
|
2879
|
+
# source://parlour//lib/parlour/types.rb#169
|
2880
|
+
class Parlour::Types::Tuple < ::Parlour::Types::Type
|
2881
|
+
# source://parlour//lib/parlour/types.rb#171
|
2882
|
+
sig { params(types: T::Array[T.any(::Parlour::Types::Type, ::String)]).void }
|
2883
|
+
def initialize(types); end
|
2884
|
+
|
2885
|
+
# source://parlour//lib/parlour/types.rb#176
|
2886
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2887
|
+
def ==(other); end
|
2888
|
+
|
2889
|
+
# source://parlour//lib/parlour/types.rb#194
|
2890
|
+
sig { override.returns(::String) }
|
2891
|
+
def describe; end
|
2892
|
+
|
2893
|
+
# source://parlour//lib/parlour/types.rb#184
|
2894
|
+
sig { override.returns(::String) }
|
2895
|
+
def generate_rbi; end
|
2896
|
+
|
2897
|
+
# source://parlour//lib/parlour/types.rb#189
|
2898
|
+
sig { override.returns(::String) }
|
2899
|
+
def generate_rbs; end
|
2900
|
+
|
2901
|
+
# source://parlour//lib/parlour/types.rb#181
|
2902
|
+
sig { returns(T::Array[::Parlour::Types::Type]) }
|
2903
|
+
def types; end
|
2904
|
+
end
|
2905
|
+
|
2906
|
+
# The top-level, abstract class for a generalised type. All of the other
|
2907
|
+
# types inherit from this. Do not instantiate.
|
2908
|
+
#
|
2909
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
2910
|
+
#
|
2911
|
+
# source://parlour//lib/parlour/types.rb#10
|
2912
|
+
class Parlour::Types::Type
|
2913
|
+
extend T::Sig
|
2914
|
+
extend T::Helpers
|
2915
|
+
|
2916
|
+
abstract!
|
2917
|
+
|
2918
|
+
# @abstract
|
2919
|
+
#
|
2920
|
+
# source://parlour//lib/parlour/types.rb#41
|
2921
|
+
sig { abstract.returns(::String) }
|
2922
|
+
def describe; end
|
2923
|
+
|
2924
|
+
# @abstract
|
2925
|
+
#
|
2926
|
+
# source://parlour//lib/parlour/types.rb#17
|
2927
|
+
sig { abstract.returns(::String) }
|
2928
|
+
def generate_rbi; end
|
2929
|
+
|
2930
|
+
# @abstract
|
2931
|
+
#
|
2932
|
+
# source://parlour//lib/parlour/types.rb#20
|
2933
|
+
sig { abstract.returns(::String) }
|
2934
|
+
def generate_rbs; end
|
2935
|
+
|
2936
|
+
# source://parlour//lib/parlour/types.rb#36
|
2937
|
+
sig { returns(T.untyped) }
|
2938
|
+
def hash; end
|
2939
|
+
|
2940
|
+
# source://parlour//lib/parlour/types.rb#32
|
2941
|
+
sig { params(type_like: T.any(::Parlour::Types::Type, ::String)).returns(::Parlour::Types::Type) }
|
2942
|
+
def to_type(type_like); end
|
2943
|
+
|
2944
|
+
class << self
|
2945
|
+
# source://parlour//lib/parlour/types.rb#23
|
2946
|
+
sig { params(type_like: T.any(::Parlour::Types::Type, ::String)).returns(::Parlour::Types::Type) }
|
2947
|
+
def to_type(type_like); end
|
2948
|
+
end
|
2949
|
+
end
|
2950
|
+
|
2951
|
+
# source://parlour//lib/parlour/types.rb#6
|
2952
|
+
Parlour::Types::TypeLike = T.type_alias { T.any(::Parlour::Types::Type, ::String) }
|
2953
|
+
|
2954
|
+
# A type which is (at least) one of the wrapped types.
|
2955
|
+
#
|
2956
|
+
# source://parlour//lib/parlour/types.rb#107
|
2957
|
+
class Parlour::Types::Union < ::Parlour::Types::Type
|
2958
|
+
# source://parlour//lib/parlour/types.rb#109
|
2959
|
+
sig { params(types: T::Array[T.any(::Parlour::Types::Type, ::String)]).void }
|
2960
|
+
def initialize(types); end
|
2961
|
+
|
2962
|
+
# source://parlour//lib/parlour/types.rb#114
|
2963
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2964
|
+
def ==(other); end
|
2965
|
+
|
2966
|
+
# source://parlour//lib/parlour/types.rb#132
|
2967
|
+
sig { override.returns(::String) }
|
2968
|
+
def describe; end
|
2969
|
+
|
2970
|
+
# source://parlour//lib/parlour/types.rb#122
|
2971
|
+
sig { override.returns(::String) }
|
2972
|
+
def generate_rbi; end
|
2973
|
+
|
2974
|
+
# source://parlour//lib/parlour/types.rb#127
|
2975
|
+
sig { override.returns(::String) }
|
2976
|
+
def generate_rbs; end
|
2977
|
+
|
2978
|
+
# source://parlour//lib/parlour/types.rb#119
|
2979
|
+
sig { returns(T::Array[::Parlour::Types::Type]) }
|
2980
|
+
def types; end
|
2981
|
+
end
|
2982
|
+
|
2983
|
+
# The explicit lack of a type.
|
2984
|
+
#
|
2985
|
+
# source://parlour//lib/parlour/types.rb#481
|
2986
|
+
class Parlour::Types::Untyped < ::Parlour::Types::Type
|
2987
|
+
# source://parlour//lib/parlour/types.rb#483
|
2988
|
+
sig { params(other: ::Object).returns(T::Boolean) }
|
2989
|
+
def ==(other); end
|
2990
|
+
|
2991
|
+
# source://parlour//lib/parlour/types.rb#498
|
2992
|
+
sig { override.returns(::String) }
|
2993
|
+
def describe; end
|
2994
|
+
|
2995
|
+
# source://parlour//lib/parlour/types.rb#488
|
2996
|
+
sig { override.returns(::String) }
|
2997
|
+
def generate_rbi; end
|
2998
|
+
|
2999
|
+
# source://parlour//lib/parlour/types.rb#493
|
3000
|
+
sig { override.returns(::String) }
|
3001
|
+
def generate_rbs; end
|
3002
|
+
end
|
3003
|
+
|
3004
|
+
# The library version.
|
3005
|
+
#
|
3006
|
+
# source://parlour//lib/parlour/version.rb#4
|
3007
|
+
Parlour::VERSION = T.let(T.unsafe(nil), String)
|