packwerk 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +14 -5
- data/.ruby-version +1 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +127 -110
- data/README.md +7 -0
- data/dev.yml +1 -1
- data/gemfiles/Gemfile-rails-6-0 +22 -0
- data/lib/packwerk.rb +1 -0
- data/lib/packwerk/application_validator.rb +5 -5
- data/lib/packwerk/node_processor.rb +2 -1
- data/lib/packwerk/node_visitor.rb +1 -1
- data/lib/packwerk/version.rb +1 -1
- data/library.yml +1 -1
- data/service.yml +2 -2
- data/shipit.rubygems.yml +5 -1
- data/sorbet/rbi/gems/{actioncable@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi → actioncable@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi} +56 -36
- data/sorbet/rbi/gems/{actionmailbox@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi → actionmailbox@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi} +25 -28
- data/sorbet/rbi/gems/{actionmailer@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi → actionmailer@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi} +43 -24
- data/sorbet/rbi/gems/{actionpack@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi → actionpack@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi} +382 -284
- data/sorbet/rbi/gems/{actiontext@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi → actiontext@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi} +76 -40
- data/sorbet/rbi/gems/{actionview@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi → actionview@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi} +206 -195
- data/sorbet/rbi/gems/{activejob@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi → activejob@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi} +64 -75
- data/sorbet/rbi/gems/{activemodel@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi → activemodel@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi} +103 -56
- data/sorbet/rbi/gems/{activerecord@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi → activerecord@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi} +1250 -898
- data/sorbet/rbi/gems/{activestorage@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi → activestorage@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi} +92 -120
- data/sorbet/rbi/gems/{activesupport@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi → activesupport@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi} +292 -193
- data/sorbet/rbi/gems/{ast@2.4.1.rbi → ast@2.4.2.rbi} +2 -1
- data/sorbet/rbi/gems/{better_html@1.0.15.rbi → better_html@1.0.16.rbi} +2 -2
- data/sorbet/rbi/gems/{concurrent-ruby@1.1.6.rbi → concurrent-ruby@1.1.8.rbi} +12 -9
- data/sorbet/rbi/gems/{erubi@1.9.0.rbi → erubi@1.10.0.rbi} +3 -1
- data/sorbet/rbi/gems/{i18n@1.8.2.rbi → i18n@1.8.10.rbi} +19 -52
- data/sorbet/rbi/gems/{loofah@2.5.0.rbi → loofah@2.9.0.rbi} +3 -1
- data/sorbet/rbi/gems/marcel@1.0.0.rbi +70 -0
- data/sorbet/rbi/gems/{mini_mime@1.0.2.rbi → mini_mime@1.0.3.rbi} +6 -6
- data/sorbet/rbi/gems/{mini_portile2@2.4.0.rbi → minitest-focus@1.2.1.rbi} +2 -2
- data/sorbet/rbi/gems/{minitest@5.14.0.rbi → minitest@5.14.4.rbi} +31 -29
- data/sorbet/rbi/gems/{mocha@1.11.2.rbi → mocha@1.12.0.rbi} +25 -36
- data/sorbet/rbi/gems/{nio4r@2.5.2.rbi → nio4r@2.5.7.rbi} +21 -20
- data/sorbet/rbi/gems/{nokogiri@1.10.9.rbi → nokogiri@1.11.2.rbi} +193 -154
- data/sorbet/rbi/gems/{parallel@1.19.1.rbi → parallel@1.20.1.rbi} +1 -1
- data/sorbet/rbi/gems/parlour@6.0.0.rbi +1272 -0
- data/sorbet/rbi/gems/{parser@2.7.1.4.rbi → parser@3.0.0.0.rbi} +287 -174
- data/sorbet/rbi/gems/{pry@0.13.1.rbi → pry@0.14.0.rbi} +1 -1
- data/sorbet/rbi/gems/racc@1.5.2.rbi +57 -0
- data/sorbet/rbi/gems/{rack@2.2.2.rbi → rack@2.2.3.rbi} +23 -35
- data/sorbet/rbi/gems/{rails@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi → rails@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi} +1 -1
- data/sorbet/rbi/gems/{railties@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi → railties@7.0.0.alpha-d612542336d9a61381311c95a27d801bb4094779.rbi} +132 -121
- data/sorbet/rbi/gems/{rake@13.0.1.rbi → rake@13.0.3.rbi} +16 -20
- data/sorbet/rbi/gems/regexp_parser@2.1.1.rbi +8 -0
- data/sorbet/rbi/gems/rubocop-ast@1.4.1.rbi +8 -0
- data/sorbet/rbi/gems/{rubocop-performance@1.5.2.rbi → rubocop-performance@1.10.2.rbi} +1 -1
- data/sorbet/rbi/gems/{rubocop-shopify@1.0.2.rbi → rubocop-shopify@2.0.1.rbi} +1 -1
- data/sorbet/rbi/gems/{rubocop-sorbet@0.3.7.rbi → rubocop-sorbet@0.6.1.rbi} +1 -1
- data/sorbet/rbi/gems/{rubocop@0.82.0.rbi → rubocop@1.12.0.rbi} +1 -1
- data/sorbet/rbi/gems/{ruby-progressbar@1.10.1.rbi → ruby-progressbar@1.11.0.rbi} +1 -1
- data/sorbet/rbi/gems/spoom@1.1.0.rbi +1061 -0
- data/sorbet/rbi/gems/{spring@2.1.0.rbi → spring@2.1.1.rbi} +7 -7
- data/sorbet/rbi/gems/{sprockets-rails@3.2.1.rbi → sprockets-rails@3.2.2.rbi} +88 -68
- data/sorbet/rbi/gems/{sprockets@4.0.0.rbi → sprockets@4.0.2.rbi} +8 -7
- data/sorbet/rbi/gems/{tapioca@0.4.5.rbi → tapioca@0.4.19.rbi} +109 -24
- data/sorbet/rbi/gems/{thor@1.0.1.rbi → thor@1.1.0.rbi} +16 -15
- data/sorbet/rbi/gems/{tzinfo@2.0.2.rbi → tzinfo@2.0.4.rbi} +21 -2
- data/sorbet/rbi/gems/{unicode-display_width@1.7.0.rbi → unicode-display_width@2.0.0.rbi} +1 -1
- data/sorbet/rbi/gems/{websocket-driver@0.7.1.rbi → websocket-driver@0.7.3.rbi} +29 -29
- data/sorbet/rbi/gems/{websocket-extensions@0.1.4.rbi → websocket-extensions@0.1.5.rbi} +2 -2
- data/sorbet/rbi/gems/zeitwerk@2.4.2.rbi +177 -0
- metadata +54 -52
- data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +0 -8
- data/sorbet/rbi/gems/marcel@0.3.3.rbi +0 -30
- data/sorbet/rbi/gems/mimemagic@0.3.5.rbi +0 -47
- data/sorbet/rbi/gems/parlour@4.0.1.rbi +0 -561
- data/sorbet/rbi/gems/spoom@1.0.4.rbi +0 -418
- data/sorbet/rbi/gems/zeitwerk@2.3.0.rbi +0 -8
@@ -0,0 +1,1272 @@
|
|
1
|
+
# DO NOT EDIT MANUALLY
|
2
|
+
# This is an autogenerated file for types exported from the `parlour` gem.
|
3
|
+
# Please instead update this file by running `bin/tapioca sync`.
|
4
|
+
|
5
|
+
# typed: true
|
6
|
+
|
7
|
+
module Parlour
|
8
|
+
end
|
9
|
+
|
10
|
+
class Parlour::ConflictResolver
|
11
|
+
sig { params(namespace: Parlour::RbiGenerator::Namespace, resolver: T.proc.params(desc: String, choices: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T.nilable(Parlour::RbiGenerator::RbiObject))).void }
|
12
|
+
def resolve_conflicts(namespace, &resolver); end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
sig { params(arr: T::Array[T.untyped]).returns(T::Boolean) }
|
17
|
+
def all_eql?(arr); end
|
18
|
+
sig { params(namespace: Parlour::RbiGenerator::Namespace, name: T.nilable(String)).void }
|
19
|
+
def deduplicate_mixins_of_name(namespace, name); end
|
20
|
+
sig { params(arr: T::Array[T.untyped]).returns(T.nilable(Symbol)) }
|
21
|
+
def merge_strategy(arr); end
|
22
|
+
end
|
23
|
+
|
24
|
+
module Parlour::Conversion
|
25
|
+
end
|
26
|
+
|
27
|
+
class Parlour::Conversion::Converter
|
28
|
+
abstract!
|
29
|
+
|
30
|
+
def initialize; end
|
31
|
+
|
32
|
+
sig { params(msg: String, node: Parlour::RbiGenerator::RbiObject).void }
|
33
|
+
def add_warning(msg, node); end
|
34
|
+
sig { returns(T::Array[[String, Parlour::TypedObject]]) }
|
35
|
+
def warnings; end
|
36
|
+
end
|
37
|
+
|
38
|
+
class Parlour::Conversion::RbiToRbs < ::Parlour::Conversion::Converter
|
39
|
+
sig { params(rbs_gen: Parlour::RbsGenerator).void }
|
40
|
+
def initialize(rbs_gen); end
|
41
|
+
|
42
|
+
sig { params(from: Parlour::RbiGenerator::Namespace, to: Parlour::RbsGenerator::Namespace).void }
|
43
|
+
def convert_all(from, to); end
|
44
|
+
sig { params(node: Parlour::RbiGenerator::RbiObject, new_parent: Parlour::RbsGenerator::Namespace).void }
|
45
|
+
def convert_object(node, new_parent); end
|
46
|
+
sig { returns(Parlour::RbsGenerator) }
|
47
|
+
def rbs_gen; end
|
48
|
+
end
|
49
|
+
|
50
|
+
module Parlour::Debugging
|
51
|
+
class << self
|
52
|
+
sig { params(value: T::Boolean).returns(T::Boolean) }
|
53
|
+
def debug_mode=(value); end
|
54
|
+
sig { returns(T::Boolean) }
|
55
|
+
def debug_mode?; end
|
56
|
+
sig { params(object: T.untyped, message: String).void }
|
57
|
+
def debug_puts(object, message); end
|
58
|
+
sig { params(object: T.untyped).returns(String) }
|
59
|
+
def name_for_debug_caller(object); end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
module Parlour::Debugging::Tree
|
64
|
+
class << self
|
65
|
+
sig { params(message: String).returns(String) }
|
66
|
+
def begin(message); end
|
67
|
+
sig { params(message: String).returns(String) }
|
68
|
+
def end(message); end
|
69
|
+
sig { params(message: String).returns(String) }
|
70
|
+
def here(message); end
|
71
|
+
def line_prefix; end
|
72
|
+
def text_prefix; end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
Parlour::Debugging::Tree::INDENT_SPACES = T.let(T.unsafe(nil), Integer)
|
77
|
+
|
78
|
+
class Parlour::DetachedRbiGenerator < ::Parlour::RbiGenerator
|
79
|
+
sig { override.returns(T.nilable(Parlour::Plugin)) }
|
80
|
+
def current_plugin; end
|
81
|
+
sig { returns(T.untyped) }
|
82
|
+
def detached!; end
|
83
|
+
sig { override.returns(Parlour::Options) }
|
84
|
+
def options; end
|
85
|
+
sig { override.params(strictness: String).returns(String) }
|
86
|
+
def rbi(strictness = T.unsafe(nil)); end
|
87
|
+
end
|
88
|
+
|
89
|
+
class Parlour::DetachedRbsGenerator < ::Parlour::RbsGenerator
|
90
|
+
sig { override.returns(T.nilable(Parlour::Plugin)) }
|
91
|
+
def current_plugin; end
|
92
|
+
sig { returns(T.untyped) }
|
93
|
+
def detached!; end
|
94
|
+
sig { override.returns(Parlour::Options) }
|
95
|
+
def options; end
|
96
|
+
sig { override.returns(String) }
|
97
|
+
def rbs; end
|
98
|
+
end
|
99
|
+
|
100
|
+
class Parlour::Generator
|
101
|
+
sig { params(break_params: Integer, tab_size: Integer, sort_namespaces: T::Boolean).void }
|
102
|
+
def initialize(break_params: T.unsafe(nil), tab_size: T.unsafe(nil), sort_namespaces: T.unsafe(nil)); end
|
103
|
+
|
104
|
+
sig { overridable.returns(T.nilable(Parlour::Plugin)) }
|
105
|
+
def current_plugin; end
|
106
|
+
def current_plugin=(_arg0); end
|
107
|
+
sig { overridable.returns(Parlour::Options) }
|
108
|
+
def options; end
|
109
|
+
end
|
110
|
+
|
111
|
+
class Parlour::Options
|
112
|
+
sig { params(break_params: Integer, tab_size: Integer, sort_namespaces: T::Boolean).void }
|
113
|
+
def initialize(break_params:, tab_size:, sort_namespaces:); end
|
114
|
+
|
115
|
+
sig { returns(Integer) }
|
116
|
+
def break_params; end
|
117
|
+
sig { params(level: Integer, str: String).returns(String) }
|
118
|
+
def indented(level, str); end
|
119
|
+
sig { returns(T::Boolean) }
|
120
|
+
def sort_namespaces; end
|
121
|
+
sig { returns(Integer) }
|
122
|
+
def tab_size; end
|
123
|
+
end
|
124
|
+
|
125
|
+
class Parlour::ParseError < ::StandardError
|
126
|
+
def initialize(buffer, range); end
|
127
|
+
|
128
|
+
sig { returns(Parser::Source::Buffer) }
|
129
|
+
def buffer; end
|
130
|
+
sig { returns(Parser::Source::Range) }
|
131
|
+
def range; end
|
132
|
+
end
|
133
|
+
|
134
|
+
class Parlour::Plugin
|
135
|
+
abstract!
|
136
|
+
|
137
|
+
sig { params(options: T::Hash[T.untyped, T.untyped]).void }
|
138
|
+
def initialize(options); end
|
139
|
+
|
140
|
+
sig { abstract.params(root: Parlour::RbiGenerator::Namespace).void }
|
141
|
+
def generate(root); end
|
142
|
+
sig { returns(T.nilable(String)) }
|
143
|
+
def strictness; end
|
144
|
+
def strictness=(_arg0); end
|
145
|
+
|
146
|
+
class << self
|
147
|
+
sig { params(new_plugin: T.class_of(Parlour::Plugin)).void }
|
148
|
+
def inherited(new_plugin); end
|
149
|
+
sig { returns(T::Hash[String, T.class_of(Parlour::Plugin)]) }
|
150
|
+
def registered_plugins; end
|
151
|
+
sig { params(plugins: T::Array[Parlour::Plugin], generator: Parlour::RbiGenerator, allow_failure: T::Boolean).void }
|
152
|
+
def run_plugins(plugins, generator, allow_failure: T.unsafe(nil)); end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
class Parlour::RbiGenerator < ::Parlour::Generator
|
157
|
+
def initialize(**hash); end
|
158
|
+
|
159
|
+
sig { overridable.params(strictness: String).returns(String) }
|
160
|
+
def rbi(strictness = T.unsafe(nil)); end
|
161
|
+
sig { overridable.returns(Parlour::RbiGenerator::Namespace) }
|
162
|
+
def root; end
|
163
|
+
end
|
164
|
+
|
165
|
+
class Parlour::RbiGenerator::Arbitrary < ::Parlour::RbiGenerator::RbiObject
|
166
|
+
sig { params(generator: Parlour::Generator, code: String, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Arbitrary).void)).void }
|
167
|
+
def initialize(generator, code: T.unsafe(nil), &block); end
|
168
|
+
|
169
|
+
sig { params(other: Object).returns(T::Boolean) }
|
170
|
+
def ==(other); end
|
171
|
+
sig { returns(String) }
|
172
|
+
def code; end
|
173
|
+
def code=(_arg0); end
|
174
|
+
sig { override.returns(String) }
|
175
|
+
def describe; end
|
176
|
+
sig { override.void }
|
177
|
+
def generalize_from_rbi!; end
|
178
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
179
|
+
def generate_rbi(indent_level, options); end
|
180
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void }
|
181
|
+
def merge_into_self(others); end
|
182
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
183
|
+
def mergeable?(others); end
|
184
|
+
end
|
185
|
+
|
186
|
+
class Parlour::RbiGenerator::Attribute < ::Parlour::RbiGenerator::Method
|
187
|
+
sig { params(generator: Parlour::Generator, name: String, kind: Symbol, type: T.any(Parlour::Types::Type, String), class_attribute: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Attribute).void)).void }
|
188
|
+
def initialize(generator, name, kind, type, class_attribute: T.unsafe(nil), &block); end
|
189
|
+
|
190
|
+
sig { override.params(other: Object).returns(T::Boolean) }
|
191
|
+
def ==(other); end
|
192
|
+
sig { returns(T::Boolean) }
|
193
|
+
def class_attribute; end
|
194
|
+
sig { override.void }
|
195
|
+
def generalize_from_rbi!; end
|
196
|
+
sig { returns(Symbol) }
|
197
|
+
def kind; end
|
198
|
+
sig { returns(T.any(Parlour::Types::Type, String)) }
|
199
|
+
def type; end
|
200
|
+
|
201
|
+
private
|
202
|
+
|
203
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
204
|
+
def generate_definition(indent_level, options); end
|
205
|
+
end
|
206
|
+
|
207
|
+
class Parlour::RbiGenerator::ClassNamespace < ::Parlour::RbiGenerator::Namespace
|
208
|
+
sig { params(generator: Parlour::Generator, name: String, final: T::Boolean, sealed: T::Boolean, superclass: T.nilable(String), abstract: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::ClassNamespace).void)).void }
|
209
|
+
def initialize(generator, name, final, sealed, superclass, abstract, &block); end
|
210
|
+
|
211
|
+
sig { returns(T::Boolean) }
|
212
|
+
def abstract; end
|
213
|
+
sig { override.returns(String) }
|
214
|
+
def describe; end
|
215
|
+
sig { override.void }
|
216
|
+
def generalize_from_rbi!; end
|
217
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
218
|
+
def generate_rbi(indent_level, options); end
|
219
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void }
|
220
|
+
def merge_into_self(others); end
|
221
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
222
|
+
def mergeable?(others); end
|
223
|
+
sig { returns(T.nilable(String)) }
|
224
|
+
def superclass; end
|
225
|
+
end
|
226
|
+
|
227
|
+
class Parlour::RbiGenerator::Constant < ::Parlour::RbiGenerator::RbiObject
|
228
|
+
sig { params(generator: Parlour::Generator, name: String, value: T.any(Parlour::Types::Type, String), eigen_constant: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Constant).void)).void }
|
229
|
+
def initialize(generator, name: T.unsafe(nil), value: T.unsafe(nil), eigen_constant: T.unsafe(nil), &block); end
|
230
|
+
|
231
|
+
sig { params(other: Object).returns(T::Boolean) }
|
232
|
+
def ==(other); end
|
233
|
+
sig { override.returns(String) }
|
234
|
+
def describe; end
|
235
|
+
def eigen_constant; end
|
236
|
+
sig { override.void }
|
237
|
+
def generalize_from_rbi!; end
|
238
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
239
|
+
def generate_rbi(indent_level, options); end
|
240
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void }
|
241
|
+
def merge_into_self(others); end
|
242
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
243
|
+
def mergeable?(others); end
|
244
|
+
sig { returns(T.any(Parlour::Types::Type, String)) }
|
245
|
+
def value; end
|
246
|
+
end
|
247
|
+
|
248
|
+
class Parlour::RbiGenerator::EnumClassNamespace < ::Parlour::RbiGenerator::ClassNamespace
|
249
|
+
sig { params(generator: Parlour::Generator, name: String, final: T::Boolean, sealed: T::Boolean, enums: T::Array[T.any(String, [String, String])], abstract: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::EnumClassNamespace).void)).void }
|
250
|
+
def initialize(generator, name, final, sealed, enums, abstract, &block); end
|
251
|
+
|
252
|
+
sig { returns(T::Array[T.any(String, [String, String])]) }
|
253
|
+
def enums; end
|
254
|
+
sig { override.void }
|
255
|
+
def generalize_from_rbi!; end
|
256
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
257
|
+
def generate_body(indent_level, options); end
|
258
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void }
|
259
|
+
def merge_into_self(others); end
|
260
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
261
|
+
def mergeable?(others); end
|
262
|
+
end
|
263
|
+
|
264
|
+
class Parlour::RbiGenerator::Extend < ::Parlour::RbiGenerator::RbiObject
|
265
|
+
sig { params(generator: Parlour::Generator, name: String, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Extend).void)).void }
|
266
|
+
def initialize(generator, name: T.unsafe(nil), &block); end
|
267
|
+
|
268
|
+
sig { params(other: Object).returns(T::Boolean) }
|
269
|
+
def ==(other); end
|
270
|
+
sig { override.returns(String) }
|
271
|
+
def describe; end
|
272
|
+
sig { override.void }
|
273
|
+
def generalize_from_rbi!; end
|
274
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
275
|
+
def generate_rbi(indent_level, options); end
|
276
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void }
|
277
|
+
def merge_into_self(others); end
|
278
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
279
|
+
def mergeable?(others); end
|
280
|
+
end
|
281
|
+
|
282
|
+
class Parlour::RbiGenerator::Include < ::Parlour::RbiGenerator::RbiObject
|
283
|
+
sig { params(generator: Parlour::Generator, name: String, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Include).void)).void }
|
284
|
+
def initialize(generator, name: T.unsafe(nil), &block); end
|
285
|
+
|
286
|
+
sig { params(other: Object).returns(T::Boolean) }
|
287
|
+
def ==(other); end
|
288
|
+
sig { override.returns(String) }
|
289
|
+
def describe; end
|
290
|
+
sig { override.void }
|
291
|
+
def generalize_from_rbi!; end
|
292
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
293
|
+
def generate_rbi(indent_level, options); end
|
294
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void }
|
295
|
+
def merge_into_self(others); end
|
296
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
297
|
+
def mergeable?(others); end
|
298
|
+
end
|
299
|
+
|
300
|
+
class Parlour::RbiGenerator::Method < ::Parlour::RbiGenerator::RbiObject
|
301
|
+
sig { params(generator: Parlour::Generator, name: String, parameters: T::Array[Parlour::RbiGenerator::Parameter], return_type: T.nilable(T.any(Parlour::Types::Type, String)), abstract: T::Boolean, implementation: T::Boolean, override: T::Boolean, overridable: T::Boolean, class_method: T::Boolean, final: T::Boolean, type_parameters: T.nilable(T::Array[Symbol]), block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Method).void)).void }
|
302
|
+
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
|
303
|
+
|
304
|
+
sig { overridable.params(other: Object).returns(T::Boolean) }
|
305
|
+
def ==(other); end
|
306
|
+
sig { returns(T::Boolean) }
|
307
|
+
def abstract; end
|
308
|
+
sig { returns(T::Boolean) }
|
309
|
+
def class_method; end
|
310
|
+
sig { override.returns(String) }
|
311
|
+
def describe; end
|
312
|
+
sig { returns(T::Boolean) }
|
313
|
+
def final; end
|
314
|
+
sig { override.void }
|
315
|
+
def generalize_from_rbi!; end
|
316
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
317
|
+
def generate_rbi(indent_level, options); end
|
318
|
+
sig { returns(T::Boolean) }
|
319
|
+
def implementation; end
|
320
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void }
|
321
|
+
def merge_into_self(others); end
|
322
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
323
|
+
def mergeable?(others); end
|
324
|
+
sig { returns(T::Boolean) }
|
325
|
+
def overridable; end
|
326
|
+
sig { returns(T::Boolean) }
|
327
|
+
def override; end
|
328
|
+
sig { returns(T::Array[Parlour::RbiGenerator::Parameter]) }
|
329
|
+
def parameters; end
|
330
|
+
sig { returns(T.nilable(T.any(Parlour::Types::Type, String))) }
|
331
|
+
def return_type; end
|
332
|
+
sig { returns(T::Array[Symbol]) }
|
333
|
+
def type_parameters; end
|
334
|
+
|
335
|
+
private
|
336
|
+
|
337
|
+
sig { overridable.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
338
|
+
def generate_definition(indent_level, options); end
|
339
|
+
sig { returns(String) }
|
340
|
+
def qualifiers; end
|
341
|
+
end
|
342
|
+
|
343
|
+
class Parlour::RbiGenerator::ModuleNamespace < ::Parlour::RbiGenerator::Namespace
|
344
|
+
sig { params(generator: Parlour::Generator, name: String, final: T::Boolean, sealed: T::Boolean, interface: T::Boolean, abstract: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::ClassNamespace).void)).void }
|
345
|
+
def initialize(generator, name, final, sealed, interface, abstract, &block); end
|
346
|
+
|
347
|
+
sig { returns(T::Boolean) }
|
348
|
+
def abstract; end
|
349
|
+
sig { override.returns(String) }
|
350
|
+
def describe; end
|
351
|
+
sig { override.void }
|
352
|
+
def generalize_from_rbi!; end
|
353
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
354
|
+
def generate_rbi(indent_level, options); end
|
355
|
+
sig { returns(T::Boolean) }
|
356
|
+
def interface; end
|
357
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void }
|
358
|
+
def merge_into_self(others); end
|
359
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
360
|
+
def mergeable?(others); end
|
361
|
+
end
|
362
|
+
|
363
|
+
class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject
|
364
|
+
sig { params(generator: Parlour::Generator, name: T.nilable(String), final: T::Boolean, sealed: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Namespace).void)).void }
|
365
|
+
def initialize(generator, name = T.unsafe(nil), final = T.unsafe(nil), sealed = T.unsafe(nil), &block); end
|
366
|
+
|
367
|
+
sig { params(comment: T.any(String, T::Array[String])).void }
|
368
|
+
def add_comment_to_next_child(comment); end
|
369
|
+
sig { returns(T::Array[Parlour::RbiGenerator::TypeAlias]) }
|
370
|
+
def aliases; end
|
371
|
+
sig { returns(T::Array[Parlour::RbiGenerator::RbiObject]) }
|
372
|
+
def children; end
|
373
|
+
sig { returns(T::Array[Parlour::RbiGenerator::Constant]) }
|
374
|
+
def constants; end
|
375
|
+
def create_arbitrary(code:, &block); end
|
376
|
+
def create_attr(*args, &blk); end
|
377
|
+
sig { params(name: String, type: T.any(Parlour::Types::Type, String), class_attribute: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Attribute).void)).returns(Parlour::RbiGenerator::Attribute) }
|
378
|
+
def create_attr_accessor(name, type:, class_attribute: T.unsafe(nil), &block); end
|
379
|
+
sig { params(name: String, type: T.any(Parlour::Types::Type, String), class_attribute: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Attribute).void)).returns(Parlour::RbiGenerator::Attribute) }
|
380
|
+
def create_attr_reader(name, type:, class_attribute: T.unsafe(nil), &block); end
|
381
|
+
sig { params(name: String, type: T.any(Parlour::Types::Type, String), class_attribute: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Attribute).void)).returns(Parlour::RbiGenerator::Attribute) }
|
382
|
+
def create_attr_writer(name, type:, class_attribute: T.unsafe(nil), &block); end
|
383
|
+
sig { params(name: String, kind: Symbol, type: T.any(Parlour::Types::Type, String), class_attribute: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Attribute).void)).returns(Parlour::RbiGenerator::Attribute) }
|
384
|
+
def create_attribute(name, kind:, type:, class_attribute: T.unsafe(nil), &block); end
|
385
|
+
sig { params(name: String, final: T::Boolean, sealed: T::Boolean, superclass: T.nilable(String), abstract: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::ClassNamespace).void)).returns(Parlour::RbiGenerator::ClassNamespace) }
|
386
|
+
def create_class(name, final: T.unsafe(nil), sealed: T.unsafe(nil), superclass: T.unsafe(nil), abstract: T.unsafe(nil), &block); end
|
387
|
+
sig { params(name: String, value: String, eigen_constant: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Constant).void)).returns(Parlour::RbiGenerator::Constant) }
|
388
|
+
def create_constant(name, value:, eigen_constant: T.unsafe(nil), &block); end
|
389
|
+
sig { params(name: String, final: T::Boolean, sealed: T::Boolean, enums: T.nilable(T::Array[T.any(String, [String, String])]), abstract: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::EnumClassNamespace).void)).returns(Parlour::RbiGenerator::EnumClassNamespace) }
|
390
|
+
def create_enum_class(name, final: T.unsafe(nil), sealed: T.unsafe(nil), enums: T.unsafe(nil), abstract: T.unsafe(nil), &block); end
|
391
|
+
sig { params(name: String, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Extend).void)).returns(Parlour::RbiGenerator::Extend) }
|
392
|
+
def create_extend(name, &block); end
|
393
|
+
sig { params(extendables: T::Array[String]).returns(T::Array[Parlour::RbiGenerator::Extend]) }
|
394
|
+
def create_extends(extendables); end
|
395
|
+
sig { params(name: String, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Include).void)).returns(Parlour::RbiGenerator::Include) }
|
396
|
+
def create_include(name, &block); end
|
397
|
+
sig { params(includables: T::Array[String]).returns(T::Array[Parlour::RbiGenerator::Include]) }
|
398
|
+
def create_includes(includables); end
|
399
|
+
sig { params(name: String, parameters: T.nilable(T::Array[Parlour::RbiGenerator::Parameter]), return_type: T.nilable(T.any(Parlour::Types::Type, String)), returns: T.nilable(T.any(Parlour::Types::Type, String)), abstract: T::Boolean, implementation: T::Boolean, override: T::Boolean, overridable: T::Boolean, class_method: T::Boolean, final: T::Boolean, type_parameters: T.nilable(T::Array[Symbol]), block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Method).void)).returns(Parlour::RbiGenerator::Method) }
|
400
|
+
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
|
401
|
+
sig { params(name: String, final: T::Boolean, sealed: T::Boolean, interface: T::Boolean, abstract: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::ClassNamespace).void)).returns(Parlour::RbiGenerator::ModuleNamespace) }
|
402
|
+
def create_module(name, final: T.unsafe(nil), sealed: T.unsafe(nil), interface: T.unsafe(nil), abstract: T.unsafe(nil), &block); end
|
403
|
+
sig { params(name: String, final: T::Boolean, sealed: T::Boolean, props: T.nilable(T::Array[Parlour::RbiGenerator::StructProp]), abstract: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::StructClassNamespace).void)).returns(Parlour::RbiGenerator::StructClassNamespace) }
|
404
|
+
def create_struct_class(name, final: T.unsafe(nil), sealed: T.unsafe(nil), props: T.unsafe(nil), abstract: T.unsafe(nil), &block); end
|
405
|
+
sig { params(name: String, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::TypeAlias).void)).returns(Parlour::RbiGenerator::TypeAlias) }
|
406
|
+
def create_type_alias(name, type:, &block); end
|
407
|
+
sig { overridable.override.returns(String) }
|
408
|
+
def describe; end
|
409
|
+
sig { returns(T::Array[Parlour::RbiGenerator::Extend]) }
|
410
|
+
def extends; end
|
411
|
+
sig { returns(T::Boolean) }
|
412
|
+
def final; end
|
413
|
+
sig { override.void }
|
414
|
+
def generalize_from_rbi!; end
|
415
|
+
sig { overridable.override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
416
|
+
def generate_rbi(indent_level, options); end
|
417
|
+
sig { returns(T::Array[Parlour::RbiGenerator::Include]) }
|
418
|
+
def includes; end
|
419
|
+
sig { overridable.override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void }
|
420
|
+
def merge_into_self(others); end
|
421
|
+
sig { overridable.override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
422
|
+
def mergeable?(others); end
|
423
|
+
sig { params(constant: Module, block: T.proc.params(x: Parlour::RbiGenerator::Namespace).void).void }
|
424
|
+
def path(constant, &block); end
|
425
|
+
sig { returns(T::Boolean) }
|
426
|
+
def sealed; end
|
427
|
+
def type_aliases(*args, &blk); end
|
428
|
+
|
429
|
+
private
|
430
|
+
|
431
|
+
sig { overridable.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
432
|
+
def generate_body(indent_level, options); end
|
433
|
+
sig { params(object: Parlour::RbiGenerator::RbiObject).void }
|
434
|
+
def move_next_comments(object); end
|
435
|
+
end
|
436
|
+
|
437
|
+
Parlour::RbiGenerator::Options = Parlour::Options
|
438
|
+
|
439
|
+
class Parlour::RbiGenerator::Parameter
|
440
|
+
sig { params(name: String, type: T.nilable(T.any(Parlour::Types::Type, String)), default: T.nilable(String)).void }
|
441
|
+
def initialize(name, type: T.unsafe(nil), default: T.unsafe(nil)); end
|
442
|
+
|
443
|
+
sig { params(other: Object).returns(T::Boolean) }
|
444
|
+
def ==(other); end
|
445
|
+
sig { returns(T.nilable(String)) }
|
446
|
+
def default; end
|
447
|
+
sig { void }
|
448
|
+
def generalize_from_rbi!; end
|
449
|
+
sig { returns(Symbol) }
|
450
|
+
def kind; end
|
451
|
+
sig { returns(String) }
|
452
|
+
def name; end
|
453
|
+
sig { returns(String) }
|
454
|
+
def name_without_kind; end
|
455
|
+
sig { returns(String) }
|
456
|
+
def to_def_param; end
|
457
|
+
sig { returns(String) }
|
458
|
+
def to_sig_param; end
|
459
|
+
sig { returns(T.any(Parlour::Types::Type, String)) }
|
460
|
+
def type; end
|
461
|
+
end
|
462
|
+
|
463
|
+
Parlour::RbiGenerator::Parameter::PREFIXES = T.let(T.unsafe(nil), Hash)
|
464
|
+
|
465
|
+
class Parlour::RbiGenerator::RbiObject < ::Parlour::TypedObject
|
466
|
+
abstract!
|
467
|
+
|
468
|
+
sig { params(generator: Parlour::Generator, name: String).void }
|
469
|
+
def initialize(generator, name); end
|
470
|
+
|
471
|
+
sig { overridable.override.returns(String) }
|
472
|
+
def describe; end
|
473
|
+
sig { abstract.void }
|
474
|
+
def generalize_from_rbi!; end
|
475
|
+
sig { abstract.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
476
|
+
def generate_rbi(indent_level, options); end
|
477
|
+
sig { returns(Parlour::Generator) }
|
478
|
+
def generator; end
|
479
|
+
sig { abstract.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void }
|
480
|
+
def merge_into_self(others); end
|
481
|
+
sig { abstract.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
482
|
+
def mergeable?(others); end
|
483
|
+
end
|
484
|
+
|
485
|
+
class Parlour::RbiGenerator::StructClassNamespace < ::Parlour::RbiGenerator::ClassNamespace
|
486
|
+
sig { params(generator: Parlour::Generator, name: String, final: T::Boolean, sealed: T::Boolean, props: T::Array[Parlour::RbiGenerator::StructProp], abstract: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::StructClassNamespace).void)).void }
|
487
|
+
def initialize(generator, name, final, sealed, props, abstract, &block); end
|
488
|
+
|
489
|
+
sig { override.void }
|
490
|
+
def generalize_from_rbi!; end
|
491
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
492
|
+
def generate_body(indent_level, options); end
|
493
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void }
|
494
|
+
def merge_into_self(others); end
|
495
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
496
|
+
def mergeable?(others); end
|
497
|
+
sig { returns(T::Array[Parlour::RbiGenerator::StructProp]) }
|
498
|
+
def props; end
|
499
|
+
end
|
500
|
+
|
501
|
+
class Parlour::RbiGenerator::StructProp
|
502
|
+
sig { params(name: String, type: T.any(Parlour::Types::Type, String), optional: T.nilable(T.any(Symbol, T::Boolean)), enum: T.nilable(String), dont_store: T.nilable(T::Boolean), foreign: T.nilable(String), default: T.nilable(String), factory: T.nilable(String), immutable: T.nilable(T::Boolean), array: T.nilable(String), override: T.nilable(T::Boolean), redaction: T.nilable(String)).void }
|
503
|
+
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
|
504
|
+
|
505
|
+
sig { params(other: Object).returns(T::Boolean) }
|
506
|
+
def ==(other); end
|
507
|
+
sig { returns(T.nilable(String)) }
|
508
|
+
def array; end
|
509
|
+
sig { returns(T.nilable(String)) }
|
510
|
+
def default; end
|
511
|
+
sig { returns(T.nilable(T::Boolean)) }
|
512
|
+
def dont_store; end
|
513
|
+
sig { returns(T.nilable(String)) }
|
514
|
+
def enum; end
|
515
|
+
sig { returns(T.nilable(String)) }
|
516
|
+
def factory; end
|
517
|
+
sig { returns(T.nilable(String)) }
|
518
|
+
def foreign; end
|
519
|
+
sig { void }
|
520
|
+
def generalize_from_rbi!; end
|
521
|
+
sig { returns(T.nilable(T::Boolean)) }
|
522
|
+
def immutable; end
|
523
|
+
sig { returns(String) }
|
524
|
+
def name; end
|
525
|
+
sig { returns(T.nilable(T.any(Symbol, T::Boolean))) }
|
526
|
+
def optional; end
|
527
|
+
sig { returns(T.nilable(T::Boolean)) }
|
528
|
+
def override; end
|
529
|
+
sig { returns(T.nilable(String)) }
|
530
|
+
def redaction; end
|
531
|
+
sig { returns(String) }
|
532
|
+
def to_prop_call; end
|
533
|
+
sig { returns(T.any(Parlour::Types::Type, String)) }
|
534
|
+
def type; end
|
535
|
+
end
|
536
|
+
|
537
|
+
Parlour::RbiGenerator::StructProp::EXTRA_PROPERTIES = T.let(T.unsafe(nil), Array)
|
538
|
+
|
539
|
+
class Parlour::RbiGenerator::TypeAlias < ::Parlour::RbiGenerator::RbiObject
|
540
|
+
sig { params(generator: Parlour::Generator, name: String, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::TypeAlias).void)).void }
|
541
|
+
def initialize(generator, name:, type:, &block); end
|
542
|
+
|
543
|
+
sig { params(other: Object).returns(T::Boolean) }
|
544
|
+
def ==(other); end
|
545
|
+
sig { override.returns(String) }
|
546
|
+
def describe; end
|
547
|
+
sig { override.void }
|
548
|
+
def generalize_from_rbi!; end
|
549
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
550
|
+
def generate_rbi(indent_level, options); end
|
551
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void }
|
552
|
+
def merge_into_self(others); end
|
553
|
+
sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
|
554
|
+
def mergeable?(others); end
|
555
|
+
sig { returns(T.any(Parlour::Types::Type, String)) }
|
556
|
+
def type; end
|
557
|
+
end
|
558
|
+
|
559
|
+
class Parlour::RbsGenerator < ::Parlour::Generator
|
560
|
+
def initialize(**hash); end
|
561
|
+
|
562
|
+
sig { overridable.returns(String) }
|
563
|
+
def rbs; end
|
564
|
+
sig { overridable.returns(Parlour::RbsGenerator::Namespace) }
|
565
|
+
def root; end
|
566
|
+
end
|
567
|
+
|
568
|
+
class Parlour::RbsGenerator::Arbitrary < ::Parlour::RbsGenerator::RbsObject
|
569
|
+
sig { params(generator: Parlour::Generator, code: String, block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Arbitrary).void)).void }
|
570
|
+
def initialize(generator, code: T.unsafe(nil), &block); end
|
571
|
+
|
572
|
+
sig { params(other: Object).returns(T::Boolean) }
|
573
|
+
def ==(other); end
|
574
|
+
sig { returns(String) }
|
575
|
+
def code; end
|
576
|
+
def code=(_arg0); end
|
577
|
+
sig { override.returns(String) }
|
578
|
+
def describe; end
|
579
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
580
|
+
def generate_rbs(indent_level, options); end
|
581
|
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
|
582
|
+
def merge_into_self(others); end
|
583
|
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
584
|
+
def mergeable?(others); end
|
585
|
+
end
|
586
|
+
|
587
|
+
class Parlour::RbsGenerator::Attribute < ::Parlour::RbsGenerator::Method
|
588
|
+
sig { params(generator: Parlour::Generator, name: String, kind: Symbol, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Attribute).void)).void }
|
589
|
+
def initialize(generator, name, kind, type, &block); end
|
590
|
+
|
591
|
+
sig { override.params(other: Object).returns(T::Boolean) }
|
592
|
+
def ==(other); end
|
593
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
594
|
+
def generate_rbs(indent_level, options); end
|
595
|
+
sig { returns(Symbol) }
|
596
|
+
def kind; end
|
597
|
+
sig { returns(T.any(Parlour::Types::Type, String)) }
|
598
|
+
def type; end
|
599
|
+
end
|
600
|
+
|
601
|
+
class Parlour::RbsGenerator::Block
|
602
|
+
sig { params(type: Parlour::Types::Proc, required: T::Boolean).void }
|
603
|
+
def initialize(type, required); end
|
604
|
+
|
605
|
+
sig { overridable.params(other: Object).returns(T::Boolean) }
|
606
|
+
def ==(other); end
|
607
|
+
sig { params(options: Parlour::Options).returns(T::Array[String]) }
|
608
|
+
def generate_rbs(options); end
|
609
|
+
sig { returns(T::Boolean) }
|
610
|
+
def required; end
|
611
|
+
sig { returns(Parlour::Types::Proc) }
|
612
|
+
def type; end
|
613
|
+
end
|
614
|
+
|
615
|
+
class Parlour::RbsGenerator::ClassNamespace < ::Parlour::RbsGenerator::Namespace
|
616
|
+
sig { params(generator: Parlour::Generator, name: String, superclass: T.nilable(T.any(Parlour::Types::Type, String)), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::ClassNamespace).void)).void }
|
617
|
+
def initialize(generator, name, superclass, &block); end
|
618
|
+
|
619
|
+
sig { override.returns(String) }
|
620
|
+
def describe; end
|
621
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
622
|
+
def generate_rbs(indent_level, options); end
|
623
|
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
|
624
|
+
def merge_into_self(others); end
|
625
|
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
626
|
+
def mergeable?(others); end
|
627
|
+
sig { returns(T.nilable(T.any(Parlour::Types::Type, String))) }
|
628
|
+
def superclass; end
|
629
|
+
end
|
630
|
+
|
631
|
+
class Parlour::RbsGenerator::Constant < ::Parlour::RbsGenerator::RbsObject
|
632
|
+
sig { params(generator: Parlour::Generator, name: String, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Constant).void)).void }
|
633
|
+
def initialize(generator, name, type:, &block); end
|
634
|
+
|
635
|
+
sig { params(other: Object).returns(T::Boolean) }
|
636
|
+
def ==(other); end
|
637
|
+
sig { override.returns(String) }
|
638
|
+
def describe; end
|
639
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
640
|
+
def generate_rbs(indent_level, options); end
|
641
|
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
|
642
|
+
def merge_into_self(others); end
|
643
|
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
644
|
+
def mergeable?(others); end
|
645
|
+
sig { returns(T.any(Parlour::Types::Type, String)) }
|
646
|
+
def type; end
|
647
|
+
end
|
648
|
+
|
649
|
+
class Parlour::RbsGenerator::Extend < ::Parlour::RbsGenerator::RbsObject
|
650
|
+
sig { params(generator: Parlour::Generator, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Extend).void)).void }
|
651
|
+
def initialize(generator, type:, &block); end
|
652
|
+
|
653
|
+
sig { params(other: Object).returns(T::Boolean) }
|
654
|
+
def ==(other); end
|
655
|
+
sig { override.returns(String) }
|
656
|
+
def describe; end
|
657
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
658
|
+
def generate_rbs(indent_level, options); end
|
659
|
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
|
660
|
+
def merge_into_self(others); end
|
661
|
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
662
|
+
def mergeable?(others); end
|
663
|
+
sig { returns(T.any(Parlour::Types::Type, String)) }
|
664
|
+
def type; end
|
665
|
+
end
|
666
|
+
|
667
|
+
class Parlour::RbsGenerator::Include < ::Parlour::RbsGenerator::RbsObject
|
668
|
+
sig { params(generator: Parlour::Generator, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Include).void)).void }
|
669
|
+
def initialize(generator, type:, &block); end
|
670
|
+
|
671
|
+
sig { params(other: Object).returns(T::Boolean) }
|
672
|
+
def ==(other); end
|
673
|
+
sig { override.returns(String) }
|
674
|
+
def describe; end
|
675
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
676
|
+
def generate_rbs(indent_level, options); end
|
677
|
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
|
678
|
+
def merge_into_self(others); end
|
679
|
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
680
|
+
def mergeable?(others); end
|
681
|
+
sig { returns(T.any(Parlour::Types::Type, String)) }
|
682
|
+
def type; end
|
683
|
+
end
|
684
|
+
|
685
|
+
class Parlour::RbsGenerator::InterfaceNamespace < ::Parlour::RbsGenerator::Namespace
|
686
|
+
sig { override.returns(String) }
|
687
|
+
def describe; end
|
688
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
689
|
+
def generate_rbs(indent_level, options); end
|
690
|
+
end
|
691
|
+
|
692
|
+
class Parlour::RbsGenerator::Method < ::Parlour::RbsGenerator::RbsObject
|
693
|
+
sig { params(generator: Parlour::Generator, name: String, signatures: T::Array[Parlour::RbsGenerator::MethodSignature], class_method: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Method).void)).void }
|
694
|
+
def initialize(generator, name, signatures, class_method: T.unsafe(nil), &block); end
|
695
|
+
|
696
|
+
sig { overridable.params(other: Object).returns(T::Boolean) }
|
697
|
+
def ==(other); end
|
698
|
+
sig { returns(T::Boolean) }
|
699
|
+
def class_method; end
|
700
|
+
sig { override.returns(String) }
|
701
|
+
def describe; end
|
702
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
703
|
+
def generate_rbs(indent_level, options); end
|
704
|
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
|
705
|
+
def merge_into_self(others); end
|
706
|
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
707
|
+
def mergeable?(others); end
|
708
|
+
sig { returns(T::Array[Parlour::RbsGenerator::MethodSignature]) }
|
709
|
+
def signatures; end
|
710
|
+
end
|
711
|
+
|
712
|
+
class Parlour::RbsGenerator::MethodSignature
|
713
|
+
sig { params(parameters: T::Array[Parlour::RbsGenerator::Parameter], return_type: T.nilable(T.any(Parlour::Types::Type, String)), block: T.nilable(Parlour::RbsGenerator::Block), type_parameters: T.nilable(T::Array[Symbol])).void }
|
714
|
+
def initialize(parameters, return_type = T.unsafe(nil), block: T.unsafe(nil), type_parameters: T.unsafe(nil)); end
|
715
|
+
|
716
|
+
sig { overridable.params(other: Object).returns(T::Boolean) }
|
717
|
+
def ==(other); end
|
718
|
+
sig { returns(T.nilable(Parlour::RbsGenerator::Block)) }
|
719
|
+
def block; end
|
720
|
+
sig { params(options: Parlour::Options).returns(T::Array[String]) }
|
721
|
+
def generate_rbs(options); end
|
722
|
+
sig { returns(T::Array[Parlour::RbsGenerator::Parameter]) }
|
723
|
+
def parameters; end
|
724
|
+
sig { returns(T.nilable(T.any(Parlour::Types::Type, String))) }
|
725
|
+
def return_type; end
|
726
|
+
sig { returns(T::Array[Symbol]) }
|
727
|
+
def type_parameters; end
|
728
|
+
end
|
729
|
+
|
730
|
+
class Parlour::RbsGenerator::ModuleNamespace < ::Parlour::RbsGenerator::Namespace
|
731
|
+
sig { override.returns(String) }
|
732
|
+
def describe; end
|
733
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
734
|
+
def generate_rbs(indent_level, options); end
|
735
|
+
end
|
736
|
+
|
737
|
+
class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject
|
738
|
+
sig { params(generator: Parlour::Generator, name: T.nilable(String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Namespace).void)).void }
|
739
|
+
def initialize(generator, name = T.unsafe(nil), &block); end
|
740
|
+
|
741
|
+
sig { params(comment: T.any(String, T::Array[String])).void }
|
742
|
+
def add_comment_to_next_child(comment); end
|
743
|
+
sig { returns(T::Array[Parlour::RbsGenerator::TypeAlias]) }
|
744
|
+
def aliases; end
|
745
|
+
sig { returns(T::Array[Parlour::RbsGenerator::RbsObject]) }
|
746
|
+
def children; end
|
747
|
+
sig { returns(T::Array[Parlour::RbsGenerator::Constant]) }
|
748
|
+
def constants; end
|
749
|
+
def create_arbitrary(code:, &block); end
|
750
|
+
def create_attr(*args, &blk); end
|
751
|
+
sig { params(name: String, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Attribute).void)).returns(Parlour::RbsGenerator::Attribute) }
|
752
|
+
def create_attr_accessor(name, type:, &block); end
|
753
|
+
sig { params(name: String, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Attribute).void)).returns(Parlour::RbsGenerator::Attribute) }
|
754
|
+
def create_attr_reader(name, type:, &block); end
|
755
|
+
sig { params(name: String, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Attribute).void)).returns(Parlour::RbsGenerator::Attribute) }
|
756
|
+
def create_attr_writer(name, type:, &block); end
|
757
|
+
sig { params(name: String, kind: Symbol, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Attribute).void)).returns(Parlour::RbsGenerator::Attribute) }
|
758
|
+
def create_attribute(name, kind:, type:, &block); end
|
759
|
+
sig { params(name: String, superclass: T.nilable(T.any(Parlour::Types::Type, String)), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::ClassNamespace).void)).returns(Parlour::RbsGenerator::ClassNamespace) }
|
760
|
+
def create_class(name, superclass: T.unsafe(nil), &block); end
|
761
|
+
sig { params(name: String, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Constant).void)).returns(Parlour::RbsGenerator::Constant) }
|
762
|
+
def create_constant(name, type:, &block); end
|
763
|
+
sig { params(type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Extend).void)).returns(Parlour::RbsGenerator::Extend) }
|
764
|
+
def create_extend(type, &block); end
|
765
|
+
sig { params(extendables: T::Array[T.any(Parlour::Types::Type, String)]).returns(T::Array[Parlour::RbsGenerator::Extend]) }
|
766
|
+
def create_extends(extendables); end
|
767
|
+
sig { params(type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Include).void)).returns(Parlour::RbsGenerator::Include) }
|
768
|
+
def create_include(type, &block); end
|
769
|
+
sig { params(includables: T::Array[T.any(Parlour::Types::Type, String)]).returns(T::Array[Parlour::RbsGenerator::Include]) }
|
770
|
+
def create_includes(includables); end
|
771
|
+
sig { params(name: String, block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Namespace).void)).returns(Parlour::RbsGenerator::InterfaceNamespace) }
|
772
|
+
def create_interface(name, &block); end
|
773
|
+
sig { params(name: String, signatures: T.nilable(T::Array[Parlour::RbsGenerator::MethodSignature]), class_method: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Method).void)).returns(Parlour::RbsGenerator::Method) }
|
774
|
+
def create_method(name, signatures = T.unsafe(nil), class_method: T.unsafe(nil), &block); end
|
775
|
+
sig { params(name: String, block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Namespace).void)).returns(Parlour::RbsGenerator::ModuleNamespace) }
|
776
|
+
def create_module(name, &block); end
|
777
|
+
sig { params(name: String, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::TypeAlias).void)).returns(Parlour::RbsGenerator::TypeAlias) }
|
778
|
+
def create_type_alias(name, type:, &block); end
|
779
|
+
sig { overridable.override.returns(String) }
|
780
|
+
def describe; end
|
781
|
+
sig { returns(T::Array[Parlour::RbsGenerator::Extend]) }
|
782
|
+
def extends; end
|
783
|
+
sig { overridable.override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
784
|
+
def generate_rbs(indent_level, options); end
|
785
|
+
sig { returns(T::Array[Parlour::RbsGenerator::Include]) }
|
786
|
+
def includes; end
|
787
|
+
sig { overridable.override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
|
788
|
+
def merge_into_self(others); end
|
789
|
+
sig { overridable.override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
790
|
+
def mergeable?(others); end
|
791
|
+
sig { params(object: T.untyped, block: T.proc.params(x: Parlour::RbsGenerator::Namespace).void).void }
|
792
|
+
def path(object, &block); end
|
793
|
+
def type_aliases(*args, &blk); end
|
794
|
+
|
795
|
+
private
|
796
|
+
|
797
|
+
sig { overridable.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
798
|
+
def generate_body(indent_level, options); end
|
799
|
+
sig { params(object: Parlour::RbsGenerator::RbsObject).void }
|
800
|
+
def move_next_comments(object); end
|
801
|
+
end
|
802
|
+
|
803
|
+
class Parlour::RbsGenerator::Parameter
|
804
|
+
sig { params(name: String, type: T.nilable(T.any(Parlour::Types::Type, String)), required: T::Boolean).void }
|
805
|
+
def initialize(name, type: T.unsafe(nil), required: T.unsafe(nil)); end
|
806
|
+
|
807
|
+
sig { params(other: Object).returns(T::Boolean) }
|
808
|
+
def ==(other); end
|
809
|
+
sig { returns(Symbol) }
|
810
|
+
def kind; end
|
811
|
+
sig { returns(String) }
|
812
|
+
def name; end
|
813
|
+
sig { returns(String) }
|
814
|
+
def name_without_kind; end
|
815
|
+
sig { returns(T::Boolean) }
|
816
|
+
def required; end
|
817
|
+
sig { returns(String) }
|
818
|
+
def to_rbs_param; end
|
819
|
+
sig { returns(T.any(Parlour::Types::Type, String)) }
|
820
|
+
def type; end
|
821
|
+
end
|
822
|
+
|
823
|
+
Parlour::RbsGenerator::Parameter::PREFIXES = T.let(T.unsafe(nil), Hash)
|
824
|
+
|
825
|
+
Parlour::RbsGenerator::Parameter::RBS_KEYWORDS = T.let(T.unsafe(nil), Array)
|
826
|
+
|
827
|
+
class Parlour::RbsGenerator::RbsObject < ::Parlour::TypedObject
|
828
|
+
abstract!
|
829
|
+
|
830
|
+
sig { params(generator: Parlour::Generator, name: String).void }
|
831
|
+
def initialize(generator, name); end
|
832
|
+
|
833
|
+
sig { overridable.override.returns(String) }
|
834
|
+
def describe; end
|
835
|
+
sig { abstract.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
836
|
+
def generate_rbs(indent_level, options); end
|
837
|
+
sig { returns(Parlour::Generator) }
|
838
|
+
def generator; end
|
839
|
+
sig { abstract.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
|
840
|
+
def merge_into_self(others); end
|
841
|
+
sig { abstract.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
842
|
+
def mergeable?(others); end
|
843
|
+
end
|
844
|
+
|
845
|
+
class Parlour::RbsGenerator::TypeAlias < ::Parlour::RbsGenerator::RbsObject
|
846
|
+
sig { params(generator: Parlour::Generator, name: String, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::TypeAlias).void)).void }
|
847
|
+
def initialize(generator, name:, type:, &block); end
|
848
|
+
|
849
|
+
sig { params(other: Object).returns(T::Boolean) }
|
850
|
+
def ==(other); end
|
851
|
+
sig { override.returns(String) }
|
852
|
+
def describe; end
|
853
|
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
854
|
+
def generate_rbs(indent_level, options); end
|
855
|
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
|
856
|
+
def merge_into_self(others); end
|
857
|
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
|
858
|
+
def mergeable?(others); end
|
859
|
+
sig { returns(T.any(Parlour::Types::Type, String)) }
|
860
|
+
def type; end
|
861
|
+
end
|
862
|
+
|
863
|
+
module Parlour::TypeLoader
|
864
|
+
class << self
|
865
|
+
sig { params(filename: String, generator: T.nilable(Parlour::RbiGenerator)).returns(Parlour::RbiGenerator::Namespace) }
|
866
|
+
def load_file(filename, generator: T.unsafe(nil)); end
|
867
|
+
sig { params(root: String, inclusions: T::Array[String], exclusions: T::Array[String], generator: T.nilable(Parlour::RbiGenerator)).returns(Parlour::RbiGenerator::Namespace) }
|
868
|
+
def load_project(root, inclusions: T.unsafe(nil), exclusions: T.unsafe(nil), generator: T.unsafe(nil)); end
|
869
|
+
sig { params(source: String, filename: T.nilable(String), generator: T.nilable(Parlour::RbiGenerator)).returns(Parlour::RbiGenerator::Namespace) }
|
870
|
+
def load_source(source, filename = T.unsafe(nil), generator: T.unsafe(nil)); end
|
871
|
+
end
|
872
|
+
end
|
873
|
+
|
874
|
+
class Parlour::TypeParser
|
875
|
+
sig { params(ast: Parser::AST::Node, unknown_node_errors: T::Boolean, generator: T.nilable(Parlour::RbiGenerator)).void }
|
876
|
+
def initialize(ast, unknown_node_errors: T.unsafe(nil), generator: T.unsafe(nil)); end
|
877
|
+
|
878
|
+
sig { returns(Parser::AST::Node) }
|
879
|
+
def ast; end
|
880
|
+
def ast=(_arg0); end
|
881
|
+
sig { returns(Parlour::RbiGenerator) }
|
882
|
+
def generator; end
|
883
|
+
def generator=(_arg0); end
|
884
|
+
sig { returns(Parlour::RbiGenerator::Namespace) }
|
885
|
+
def parse_all; end
|
886
|
+
sig { params(path: Parlour::TypeParser::NodePath, is_within_eigenclass: T::Boolean).returns(T::Array[Parlour::RbiGenerator::Method]) }
|
887
|
+
def parse_method_into_methods(path, is_within_eigenclass: T.unsafe(nil)); end
|
888
|
+
sig { params(node: Parser::AST::Node).returns(Parlour::Types::Type) }
|
889
|
+
def parse_node_to_type(node); end
|
890
|
+
sig { params(path: Parlour::TypeParser::NodePath, is_within_eigenclass: T::Boolean).returns(T::Array[Parlour::RbiGenerator::RbiObject]) }
|
891
|
+
def parse_path_to_object(path, is_within_eigenclass: T.unsafe(nil)); end
|
892
|
+
sig { params(path: Parlour::TypeParser::NodePath, is_within_eigenclass: T::Boolean).returns(T::Array[Parlour::RbiGenerator::Method]) }
|
893
|
+
def parse_sig_into_methods(path, is_within_eigenclass: T.unsafe(nil)); end
|
894
|
+
sig { params(path: Parlour::TypeParser::NodePath).returns(Parlour::TypeParser::IntermediateSig) }
|
895
|
+
def parse_sig_into_sig(path); end
|
896
|
+
sig { returns(T::Boolean) }
|
897
|
+
def unknown_node_errors; end
|
898
|
+
|
899
|
+
protected
|
900
|
+
|
901
|
+
sig { params(node: T.nilable(Parser::AST::Node), modifier: Symbol).returns(T::Boolean) }
|
902
|
+
def body_has_modifier?(node, modifier); end
|
903
|
+
sig { params(node: Parser::AST::Node).returns([T::Array[String], T::Array[String]]) }
|
904
|
+
def body_includes_and_extends(node); end
|
905
|
+
sig { params(node: T.nilable(Parser::AST::Node)).returns(T::Array[Symbol]) }
|
906
|
+
def constant_names(node); end
|
907
|
+
sig { params(node: T.nilable(Parser::AST::Node)).returns(T.nilable(String)) }
|
908
|
+
def node_to_s(node); end
|
909
|
+
sig { params(desc: String, node: T.any(Parlour::TypeParser::NodePath, Parser::AST::Node)).returns(T.noreturn) }
|
910
|
+
def parse_err(desc, node); end
|
911
|
+
sig { params(path: Parlour::TypeParser::NodePath).returns(T::Boolean) }
|
912
|
+
def previous_sibling_sig_node?(path); end
|
913
|
+
sig { params(node: Parser::AST::Node).returns(T::Boolean) }
|
914
|
+
def sig_node?(node); end
|
915
|
+
sig { params(msg: String, node: Parser::AST::Node).void }
|
916
|
+
def warning(msg, node); end
|
917
|
+
sig { type_parameters(:A, :B).params(a: T::Array[T.type_parameter(:A)], fa: T.proc.params(item: T.type_parameter(:A)).returns(T.untyped), b: T::Array[T.type_parameter(:B)], fb: T.proc.params(item: T.type_parameter(:B)).returns(T.untyped)).returns(T::Array[[T.type_parameter(:A), T.type_parameter(:B)]]) }
|
918
|
+
def zip_by(a, fa, b, fb); end
|
919
|
+
|
920
|
+
class << self
|
921
|
+
sig { params(filename: String, source: String, generator: T.nilable(Parlour::RbiGenerator)).returns(Parlour::TypeParser) }
|
922
|
+
def from_source(filename, source, generator: T.unsafe(nil)); end
|
923
|
+
sig { params(str: String).returns(Parlour::Types::Type) }
|
924
|
+
def parse_single_type(str); end
|
925
|
+
end
|
926
|
+
end
|
927
|
+
|
928
|
+
class Parlour::TypeParser::IntermediateSig < ::T::Struct
|
929
|
+
prop :type_parameters, T.nilable(T::Array[Symbol])
|
930
|
+
prop :overridable, T::Boolean
|
931
|
+
prop :override, T::Boolean
|
932
|
+
prop :abstract, T::Boolean
|
933
|
+
prop :final, T::Boolean
|
934
|
+
prop :return_type, T.nilable(String)
|
935
|
+
prop :params, T.nilable(T::Array[Parser::AST::Node])
|
936
|
+
|
937
|
+
class << self
|
938
|
+
def inherited(s); end
|
939
|
+
end
|
940
|
+
end
|
941
|
+
|
942
|
+
class Parlour::TypeParser::NodePath
|
943
|
+
sig { params(indices: T::Array[Integer]).void }
|
944
|
+
def initialize(indices); end
|
945
|
+
|
946
|
+
sig { params(index: Integer).returns(Parlour::TypeParser::NodePath) }
|
947
|
+
def child(index); end
|
948
|
+
sig { returns(T::Array[Integer]) }
|
949
|
+
def indices; end
|
950
|
+
sig { returns(Parlour::TypeParser::NodePath) }
|
951
|
+
def parent; end
|
952
|
+
sig { params(offset: Integer).returns(Parlour::TypeParser::NodePath) }
|
953
|
+
def sibling(offset); end
|
954
|
+
sig { params(start: Parser::AST::Node).returns(Parser::AST::Node) }
|
955
|
+
def traverse(start); end
|
956
|
+
end
|
957
|
+
|
958
|
+
class Parlour::TypedObject
|
959
|
+
abstract!
|
960
|
+
|
961
|
+
sig { params(name: String).void }
|
962
|
+
def initialize(name); end
|
963
|
+
|
964
|
+
sig { params(comment: T.any(String, T::Array[String])).void }
|
965
|
+
def add_comment(comment); end
|
966
|
+
def add_comments(*args, &blk); end
|
967
|
+
sig { returns(T::Array[String]) }
|
968
|
+
def comments; end
|
969
|
+
sig { abstract.returns(String) }
|
970
|
+
def describe; end
|
971
|
+
sig { returns(T.nilable(Parlour::Plugin)) }
|
972
|
+
def generated_by; end
|
973
|
+
sig { returns(String) }
|
974
|
+
def name; end
|
975
|
+
|
976
|
+
protected
|
977
|
+
|
978
|
+
sig { params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
|
979
|
+
def generate_comments(indent_level, options); end
|
980
|
+
end
|
981
|
+
|
982
|
+
module Parlour::Types
|
983
|
+
end
|
984
|
+
|
985
|
+
class Parlour::Types::Array < ::Parlour::Types::SingleElementCollection
|
986
|
+
sig { params(other: Object).returns(T::Boolean) }
|
987
|
+
def ==(other); end
|
988
|
+
sig { override.returns(String) }
|
989
|
+
def collection_name; end
|
990
|
+
end
|
991
|
+
|
992
|
+
class Parlour::Types::Boolean < ::Parlour::Types::Type
|
993
|
+
sig { params(other: Object).returns(T::Boolean) }
|
994
|
+
def ==(other); end
|
995
|
+
sig { override.returns(String) }
|
996
|
+
def describe; end
|
997
|
+
sig { override.returns(String) }
|
998
|
+
def generate_rbi; end
|
999
|
+
sig { override.returns(String) }
|
1000
|
+
def generate_rbs; end
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
class Parlour::Types::Class < ::Parlour::Types::Type
|
1004
|
+
sig { params(type: T.any(Parlour::Types::Type, String)).void }
|
1005
|
+
def initialize(type); end
|
1006
|
+
|
1007
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1008
|
+
def ==(other); end
|
1009
|
+
sig { override.returns(String) }
|
1010
|
+
def describe; end
|
1011
|
+
sig { override.returns(String) }
|
1012
|
+
def generate_rbi; end
|
1013
|
+
sig { override.returns(String) }
|
1014
|
+
def generate_rbs; end
|
1015
|
+
sig { returns(Parlour::Types::Type) }
|
1016
|
+
def type; end
|
1017
|
+
end
|
1018
|
+
|
1019
|
+
class Parlour::Types::Enumerable < ::Parlour::Types::SingleElementCollection
|
1020
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1021
|
+
def ==(other); end
|
1022
|
+
sig { override.returns(String) }
|
1023
|
+
def collection_name; end
|
1024
|
+
end
|
1025
|
+
|
1026
|
+
class Parlour::Types::Enumerator < ::Parlour::Types::SingleElementCollection
|
1027
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1028
|
+
def ==(other); end
|
1029
|
+
sig { override.returns(String) }
|
1030
|
+
def collection_name; end
|
1031
|
+
end
|
1032
|
+
|
1033
|
+
class Parlour::Types::Generic < ::Parlour::Types::Type
|
1034
|
+
sig { params(type: T.any(Parlour::Types::Type, String), type_params: T::Array[T.any(Parlour::Types::Type, String)]).void }
|
1035
|
+
def initialize(type, type_params); end
|
1036
|
+
|
1037
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1038
|
+
def ==(other); end
|
1039
|
+
sig { override.returns(String) }
|
1040
|
+
def describe; end
|
1041
|
+
sig { override.returns(String) }
|
1042
|
+
def generate_rbi; end
|
1043
|
+
sig { override.returns(String) }
|
1044
|
+
def generate_rbs; end
|
1045
|
+
sig { returns(Parlour::Types::Type) }
|
1046
|
+
def type; end
|
1047
|
+
sig { returns(T::Array[Parlour::Types::Type]) }
|
1048
|
+
def type_params; end
|
1049
|
+
end
|
1050
|
+
|
1051
|
+
class Parlour::Types::Hash < ::Parlour::Types::Type
|
1052
|
+
sig { params(key: T.any(Parlour::Types::Type, String), value: T.any(Parlour::Types::Type, String)).void }
|
1053
|
+
def initialize(key, value); end
|
1054
|
+
|
1055
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1056
|
+
def ==(other); end
|
1057
|
+
sig { override.returns(String) }
|
1058
|
+
def describe; end
|
1059
|
+
sig { override.returns(String) }
|
1060
|
+
def generate_rbi; end
|
1061
|
+
sig { override.returns(String) }
|
1062
|
+
def generate_rbs; end
|
1063
|
+
sig { returns(Parlour::Types::Type) }
|
1064
|
+
def key; end
|
1065
|
+
sig { returns(Parlour::Types::Type) }
|
1066
|
+
def value; end
|
1067
|
+
end
|
1068
|
+
|
1069
|
+
class Parlour::Types::Intersection < ::Parlour::Types::Type
|
1070
|
+
sig { params(types: T::Array[T.any(Parlour::Types::Type, String)]).void }
|
1071
|
+
def initialize(types); end
|
1072
|
+
|
1073
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1074
|
+
def ==(other); end
|
1075
|
+
sig { override.returns(String) }
|
1076
|
+
def describe; end
|
1077
|
+
sig { override.returns(String) }
|
1078
|
+
def generate_rbi; end
|
1079
|
+
sig { override.returns(String) }
|
1080
|
+
def generate_rbs; end
|
1081
|
+
sig { returns(T::Array[Parlour::Types::Type]) }
|
1082
|
+
def types; end
|
1083
|
+
end
|
1084
|
+
|
1085
|
+
class Parlour::Types::Nilable < ::Parlour::Types::Type
|
1086
|
+
sig { params(type: T.any(Parlour::Types::Type, String)).void }
|
1087
|
+
def initialize(type); end
|
1088
|
+
|
1089
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1090
|
+
def ==(other); end
|
1091
|
+
sig { override.returns(String) }
|
1092
|
+
def describe; end
|
1093
|
+
sig { override.returns(String) }
|
1094
|
+
def generate_rbi; end
|
1095
|
+
sig { override.returns(String) }
|
1096
|
+
def generate_rbs; end
|
1097
|
+
sig { returns(Parlour::Types::Type) }
|
1098
|
+
def type; end
|
1099
|
+
end
|
1100
|
+
|
1101
|
+
class Parlour::Types::Proc < ::Parlour::Types::Type
|
1102
|
+
sig { params(parameters: T::Array[Parlour::Types::Proc::Parameter], return_type: T.nilable(T.any(Parlour::Types::Type, String))).void }
|
1103
|
+
def initialize(parameters, return_type); end
|
1104
|
+
|
1105
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1106
|
+
def ==(other); end
|
1107
|
+
sig { override.returns(String) }
|
1108
|
+
def describe; end
|
1109
|
+
sig { override.returns(String) }
|
1110
|
+
def generate_rbi; end
|
1111
|
+
sig { override.returns(String) }
|
1112
|
+
def generate_rbs; end
|
1113
|
+
sig { returns(T::Array[Parlour::Types::Proc::Parameter]) }
|
1114
|
+
def parameters; end
|
1115
|
+
sig { returns(T.nilable(Parlour::Types::Type)) }
|
1116
|
+
def return_type; end
|
1117
|
+
end
|
1118
|
+
|
1119
|
+
class Parlour::Types::Proc::Parameter
|
1120
|
+
sig { params(name: String, type: T.any(Parlour::Types::Type, String), default: T.nilable(String)).void }
|
1121
|
+
def initialize(name, type, default = T.unsafe(nil)); end
|
1122
|
+
|
1123
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1124
|
+
def ==(other); end
|
1125
|
+
sig { returns(T.nilable(String)) }
|
1126
|
+
def default; end
|
1127
|
+
sig { returns(String) }
|
1128
|
+
def name; end
|
1129
|
+
sig { returns(Parlour::Types::Type) }
|
1130
|
+
def type; end
|
1131
|
+
end
|
1132
|
+
|
1133
|
+
class Parlour::Types::Range < ::Parlour::Types::SingleElementCollection
|
1134
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1135
|
+
def ==(other); end
|
1136
|
+
sig { override.returns(String) }
|
1137
|
+
def collection_name; end
|
1138
|
+
end
|
1139
|
+
|
1140
|
+
class Parlour::Types::Raw < ::Parlour::Types::Type
|
1141
|
+
sig { params(str: String).void }
|
1142
|
+
def initialize(str); end
|
1143
|
+
|
1144
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1145
|
+
def ==(other); end
|
1146
|
+
sig { override.returns(String) }
|
1147
|
+
def describe; end
|
1148
|
+
sig { override.returns(String) }
|
1149
|
+
def generate_rbi; end
|
1150
|
+
sig { override.returns(String) }
|
1151
|
+
def generate_rbs; end
|
1152
|
+
sig { returns(String) }
|
1153
|
+
def str; end
|
1154
|
+
end
|
1155
|
+
|
1156
|
+
class Parlour::Types::Record < ::Parlour::Types::Type
|
1157
|
+
sig { params(keys_to_types: T::Hash[Symbol, T.any(Parlour::Types::Type, String)]).void }
|
1158
|
+
def initialize(keys_to_types); end
|
1159
|
+
|
1160
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1161
|
+
def ==(other); end
|
1162
|
+
sig { override.returns(String) }
|
1163
|
+
def describe; end
|
1164
|
+
sig { override.returns(String) }
|
1165
|
+
def generate_rbi; end
|
1166
|
+
sig { override.returns(String) }
|
1167
|
+
def generate_rbs; end
|
1168
|
+
sig { returns(T::Hash[Symbol, Parlour::Types::Type]) }
|
1169
|
+
def keys_to_types; end
|
1170
|
+
end
|
1171
|
+
|
1172
|
+
class Parlour::Types::Self < ::Parlour::Types::Type
|
1173
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1174
|
+
def ==(other); end
|
1175
|
+
sig { override.returns(String) }
|
1176
|
+
def describe; end
|
1177
|
+
sig { override.returns(String) }
|
1178
|
+
def generate_rbi; end
|
1179
|
+
sig { override.returns(String) }
|
1180
|
+
def generate_rbs; end
|
1181
|
+
end
|
1182
|
+
|
1183
|
+
class Parlour::Types::Set < ::Parlour::Types::SingleElementCollection
|
1184
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1185
|
+
def ==(other); end
|
1186
|
+
sig { override.returns(String) }
|
1187
|
+
def collection_name; end
|
1188
|
+
end
|
1189
|
+
|
1190
|
+
class Parlour::Types::SingleElementCollection < ::Parlour::Types::Type
|
1191
|
+
abstract!
|
1192
|
+
|
1193
|
+
sig { params(element: T.any(Parlour::Types::Type, String)).void }
|
1194
|
+
def initialize(element); end
|
1195
|
+
|
1196
|
+
sig { abstract.returns(String) }
|
1197
|
+
def collection_name; end
|
1198
|
+
sig { override.returns(String) }
|
1199
|
+
def describe; end
|
1200
|
+
sig { returns(Parlour::Types::Type) }
|
1201
|
+
def element; end
|
1202
|
+
sig { override.returns(String) }
|
1203
|
+
def generate_rbi; end
|
1204
|
+
sig { override.returns(String) }
|
1205
|
+
def generate_rbs; end
|
1206
|
+
end
|
1207
|
+
|
1208
|
+
class Parlour::Types::Tuple < ::Parlour::Types::Type
|
1209
|
+
sig { params(types: T::Array[T.any(Parlour::Types::Type, String)]).void }
|
1210
|
+
def initialize(types); end
|
1211
|
+
|
1212
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1213
|
+
def ==(other); end
|
1214
|
+
sig { override.returns(String) }
|
1215
|
+
def describe; end
|
1216
|
+
sig { override.returns(String) }
|
1217
|
+
def generate_rbi; end
|
1218
|
+
sig { override.returns(String) }
|
1219
|
+
def generate_rbs; end
|
1220
|
+
sig { returns(T::Array[Parlour::Types::Type]) }
|
1221
|
+
def types; end
|
1222
|
+
end
|
1223
|
+
|
1224
|
+
class Parlour::Types::Type
|
1225
|
+
abstract!
|
1226
|
+
|
1227
|
+
def initialize(*args, &blk); end
|
1228
|
+
|
1229
|
+
sig { abstract.returns(String) }
|
1230
|
+
def describe; end
|
1231
|
+
sig { abstract.returns(String) }
|
1232
|
+
def generate_rbi; end
|
1233
|
+
sig { abstract.returns(String) }
|
1234
|
+
def generate_rbs; end
|
1235
|
+
def hash; end
|
1236
|
+
sig { params(type_like: T.any(Parlour::Types::Type, String)).returns(Parlour::Types::Type) }
|
1237
|
+
def to_type(type_like); end
|
1238
|
+
|
1239
|
+
class << self
|
1240
|
+
sig { params(type_like: T.any(Parlour::Types::Type, String)).returns(Parlour::Types::Type) }
|
1241
|
+
def to_type(type_like); end
|
1242
|
+
end
|
1243
|
+
end
|
1244
|
+
|
1245
|
+
class Parlour::Types::Union < ::Parlour::Types::Type
|
1246
|
+
sig { params(types: T::Array[T.any(Parlour::Types::Type, String)]).void }
|
1247
|
+
def initialize(types); end
|
1248
|
+
|
1249
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1250
|
+
def ==(other); end
|
1251
|
+
sig { override.returns(String) }
|
1252
|
+
def describe; end
|
1253
|
+
sig { override.returns(String) }
|
1254
|
+
def generate_rbi; end
|
1255
|
+
sig { override.returns(String) }
|
1256
|
+
def generate_rbs; end
|
1257
|
+
sig { returns(T::Array[Parlour::Types::Type]) }
|
1258
|
+
def types; end
|
1259
|
+
end
|
1260
|
+
|
1261
|
+
class Parlour::Types::Untyped < ::Parlour::Types::Type
|
1262
|
+
sig { params(other: Object).returns(T::Boolean) }
|
1263
|
+
def ==(other); end
|
1264
|
+
sig { override.returns(String) }
|
1265
|
+
def describe; end
|
1266
|
+
sig { override.returns(String) }
|
1267
|
+
def generate_rbi; end
|
1268
|
+
sig { override.returns(String) }
|
1269
|
+
def generate_rbs; end
|
1270
|
+
end
|
1271
|
+
|
1272
|
+
Parlour::VERSION = T.let(T.unsafe(nil), String)
|