twirbet 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/twirbet/version.rb +1 -1
- metadata +1 -122
- data/.rspec +0 -3
- data/.rubocop.yml +0 -20
- data/CHANGELOG.md +0 -5
- data/Gemfile +0 -28
- data/Gemfile.lock +0 -127
- data/Rakefile +0 -17
- data/examples/clientcompat/client +0 -28
- data/examples/clientcompat/clientcompat.proto +0 -29
- data/examples/clientcompat/clientcompat_pb.rb +0 -36
- data/examples/clientcompat/clientcompat_twirbet.rb +0 -57
- data/examples/ping/Gemfile +0 -11
- data/examples/ping/Gemfile.lock +0 -69
- data/examples/ping/bin/puma +0 -27
- data/examples/ping/bin/pumactl +0 -27
- data/examples/ping/bin/srb +0 -27
- data/examples/ping/bin/srb-rbi +0 -27
- data/examples/ping/bin/tapioca +0 -27
- data/examples/ping/client.rb +0 -14
- data/examples/ping/config/application.rb +0 -13
- data/examples/ping/config/environment.rb +0 -6
- data/examples/ping/config.ru +0 -8
- data/examples/ping/proto/ping.proto +0 -15
- data/examples/ping/proto/ping_pb.rb +0 -20
- data/examples/ping/proto/ping_twirbet.rb +0 -47
- data/examples/ping/sorbet/config +0 -4
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/descriptor_proto/extension_range.rbi +0 -34
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/descriptor_proto/reserved_range.rbi +0 -22
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/descriptor_proto.rbi +0 -83
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/enum_descriptor_proto/enum_reserved_range.rbi +0 -22
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/enum_descriptor_proto.rbi +0 -48
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/enum_options.rbi +0 -34
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/enum_value_descriptor_proto.rbi +0 -34
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/enum_value_options.rbi +0 -27
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/extension_range_options.rbi +0 -20
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/field_descriptor_proto/label.rbi +0 -22
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/field_descriptor_proto/type.rbi +0 -37
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/field_descriptor_proto.rbi +0 -90
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/field_options/c_type.rbi +0 -22
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/field_options/js_type.rbi +0 -22
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/field_options.rbi +0 -69
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/file_descriptor_proto.rbi +0 -97
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/file_descriptor_set.rbi +0 -20
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/file_options/optimize_mode.rbi +0 -22
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/file_options.rbi +0 -160
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/generated_code_info/annotation.rbi +0 -41
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/generated_code_info.rbi +0 -20
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/map.rbi +0 -12
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/message_options.rbi +0 -48
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/method_descriptor_proto.rbi +0 -55
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/method_options/idempotency_level.rbi +0 -22
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/method_options.rbi +0 -34
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/oneof_descriptor_proto.rbi +0 -22
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/oneof_options.rbi +0 -20
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/repeated_field.rbi +0 -11
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/service_descriptor_proto.rbi +0 -34
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/service_options.rbi +0 -27
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/source_code_info/location.rbi +0 -48
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/source_code_info.rbi +0 -20
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/uninterpreted_option/name_part.rbi +0 -22
- data/examples/ping/sorbet/rbi/dsl/google/protobuf/uninterpreted_option.rbi +0 -62
- data/examples/ping/sorbet/rbi/dsl/ping/ping_request.rbi +0 -16
- data/examples/ping/sorbet/rbi/dsl/ping/ping_response.rbi +0 -16
- data/examples/ping/sorbet/rbi/gems/ast@2.4.2.rbi +0 -584
- data/examples/ping/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +0 -8
- data/examples/ping/sorbet/rbi/gems/google-protobuf@3.21.12.rbi +0 -1645
- data/examples/ping/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -158
- data/examples/ping/sorbet/rbi/gems/nio4r@2.5.8.rbi +0 -8
- data/examples/ping/sorbet/rbi/gems/parallel@1.22.1.rbi +0 -277
- data/examples/ping/sorbet/rbi/gems/parser@3.1.3.0.rbi +0 -5076
- data/examples/ping/sorbet/rbi/gems/puma@6.0.0.rbi +0 -4177
- data/examples/ping/sorbet/rbi/gems/rack@3.0.2.rbi +0 -5016
- data/examples/ping/sorbet/rbi/gems/rbi@0.0.16.rbi +0 -3008
- data/examples/ping/sorbet/rbi/gems/spoom@1.1.15.rbi +0 -2383
- data/examples/ping/sorbet/rbi/gems/tapioca@0.10.3.rbi +0 -3032
- data/examples/ping/sorbet/rbi/gems/thor@1.2.1.rbi +0 -3919
- data/examples/ping/sorbet/rbi/gems/twirbet@0.1.0.rbi +0 -528
- data/examples/ping/sorbet/rbi/gems/unparser@0.6.5.rbi +0 -8
- data/examples/ping/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -2498
- data/examples/ping/sorbet/rbi/gems/yard-sorbet@0.7.0.rbi +0 -391
- data/examples/ping/sorbet/rbi/gems/yard@0.9.28.rbi +0 -17022
- data/examples/ping/sorbet/tapioca/config.yml +0 -13
- data/examples/ping/sorbet/tapioca/require.rb +0 -5
- data/sorbet/config +0 -5
- data/sorbet/rbi/annotations/rainbow.rbi +0 -269
- data/sorbet/rbi/custom/ping.rbi +0 -23
- data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -584
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +0 -1064
- data/sorbet/rbi/gems/google-protobuf@3.21.12.rbi +0 -1645
- data/sorbet/rbi/gems/json@2.6.3.rbi +0 -1541
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -158
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +0 -277
- data/sorbet/rbi/gems/parser@3.1.3.0.rbi +0 -6878
- data/sorbet/rbi/gems/rack@3.0.2.rbi +0 -5163
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -397
- data/sorbet/rbi/gems/rake@13.0.6.rbi +0 -2946
- data/sorbet/rbi/gems/rbi@0.0.16.rbi +0 -3008
- data/sorbet/rbi/gems/regexp_parser@2.6.1.rbi +0 -3126
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +0 -4660
- data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +0 -10492
- data/sorbet/rbi/gems/rspec-expectations@3.12.1.rbi +0 -7817
- data/sorbet/rbi/gems/rspec-mocks@3.12.1.rbi +0 -4994
- data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +0 -1477
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +0 -10
- data/sorbet/rbi/gems/rubocop-ast@1.24.0.rbi +0 -6790
- data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -354
- data/sorbet/rbi/gems/rubocop-rspec@2.16.0.rbi +0 -7650
- data/sorbet/rbi/gems/rubocop-shopify@2.10.1.rbi +0 -8
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +0 -1014
- data/sorbet/rbi/gems/rubocop@1.40.0.rbi +0 -51560
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +0 -1212
- data/sorbet/rbi/gems/spoom@1.1.15.rbi +0 -2383
- data/sorbet/rbi/gems/tapioca@0.10.3.rbi +0 -3032
- data/sorbet/rbi/gems/thor@1.2.1.rbi +0 -3950
- data/sorbet/rbi/gems/unicode-display_width@2.3.0.rbi +0 -46
- data/sorbet/rbi/gems/unparser@0.6.5.rbi +0 -4265
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -2498
- data/sorbet/rbi/gems/yard-sorbet@0.7.0.rbi +0 -391
- data/sorbet/rbi/gems/yard@0.9.28.rbi +0 -17033
- data/sorbet/tapioca/config.yml +0 -13
- data/sorbet/tapioca/require.rb +0 -4
- data/twirbet.gemspec +0 -36
@@ -1,391 +0,0 @@
|
|
1
|
-
# typed: true
|
2
|
-
|
3
|
-
# DO NOT EDIT MANUALLY
|
4
|
-
# This is an autogenerated file for types exported from the `yard-sorbet` gem.
|
5
|
-
# Please instead update this file by running `bin/tapioca gem yard-sorbet`.
|
6
|
-
|
7
|
-
class YARD::Handlers::Ruby::ClassHandler < ::YARD::Handlers::Ruby::Base
|
8
|
-
include ::YARDSorbet::Handlers::StructClassHandler
|
9
|
-
end
|
10
|
-
|
11
|
-
# Types are documentation
|
12
|
-
#
|
13
|
-
# source://yard-sorbet//lib/yard-sorbet/version.rb#5
|
14
|
-
module YARDSorbet; end
|
15
|
-
|
16
|
-
# Extract & re-add directives to a docstring
|
17
|
-
#
|
18
|
-
# source://yard-sorbet//lib/yard-sorbet/directives.rb#6
|
19
|
-
module YARDSorbet::Directives
|
20
|
-
class << self
|
21
|
-
# source://yard-sorbet//lib/yard-sorbet/directives.rb#21
|
22
|
-
sig { params(docstring: ::String, directives: T::Array[::String]).void }
|
23
|
-
def add_directives(docstring, directives); end
|
24
|
-
|
25
|
-
# source://yard-sorbet//lib/yard-sorbet/directives.rb#10
|
26
|
-
sig { params(docstring: T.nilable(::String)).returns([::YARD::Docstring, T::Array[::String]]) }
|
27
|
-
def extract_directives(docstring); end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
# Custom YARD Handlers
|
32
|
-
#
|
33
|
-
# @see https://rubydoc.info/gems/yard/YARD/Handlers/Base YARD Base Handler documentation
|
34
|
-
#
|
35
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers.rb#7
|
36
|
-
module YARDSorbet::Handlers; end
|
37
|
-
|
38
|
-
# Apllies an `@abstract` tag to `abstract!`/`interface!` modules (if not alerady present).
|
39
|
-
#
|
40
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#7
|
41
|
-
class YARDSorbet::Handlers::AbstractDSLHandler < ::YARD::Handlers::Ruby::Base
|
42
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#21
|
43
|
-
sig { void }
|
44
|
-
def process; end
|
45
|
-
end
|
46
|
-
|
47
|
-
# Extra text for class namespaces
|
48
|
-
#
|
49
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#18
|
50
|
-
YARDSorbet::Handlers::AbstractDSLHandler::CLASS_TAG_TEXT = T.let(T.unsafe(nil), String)
|
51
|
-
|
52
|
-
# The text accompanying the `@abstract` tag.
|
53
|
-
#
|
54
|
-
# @see https://github.com/lsegal/yard/blob/main/templates/default/docstring/html/abstract.erb The `@abstract` tag template
|
55
|
-
#
|
56
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#16
|
57
|
-
YARDSorbet::Handlers::AbstractDSLHandler::TAG_TEXT = T.let(T.unsafe(nil), String)
|
58
|
-
|
59
|
-
# Handle `enums` calls, registering enum values as constants
|
60
|
-
#
|
61
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#7
|
62
|
-
class YARDSorbet::Handlers::EnumsHandler < ::YARD::Handlers::Ruby::Base
|
63
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#14
|
64
|
-
sig { void }
|
65
|
-
def process; end
|
66
|
-
|
67
|
-
private
|
68
|
-
|
69
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#29
|
70
|
-
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) }
|
71
|
-
def const_assign_node?(node); end
|
72
|
-
end
|
73
|
-
|
74
|
-
# Extends any modules included via `mixes_in_class_methods`
|
75
|
-
#
|
76
|
-
# @see https://sorbet.org/docs/abstract#interfaces-and-the-included-hook Sorbet `mixes_in_class_methods` documentation
|
77
|
-
#
|
78
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#9
|
79
|
-
class YARDSorbet::Handlers::IncludeHandler < ::YARD::Handlers::Ruby::Base
|
80
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#16
|
81
|
-
sig { void }
|
82
|
-
def process; end
|
83
|
-
|
84
|
-
private
|
85
|
-
|
86
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#30
|
87
|
-
sig { returns(::YARD::CodeObjects::NamespaceObject) }
|
88
|
-
def included_in; end
|
89
|
-
end
|
90
|
-
|
91
|
-
# Tracks modules that invoke `mixes_in_class_methods` for use in {IncludeHandler}
|
92
|
-
#
|
93
|
-
# @see https://sorbet.org/docs/abstract#interfaces-and-the-included-hook Sorbet `mixes_in_class_methods` documentation
|
94
|
-
#
|
95
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#9
|
96
|
-
class YARDSorbet::Handlers::MixesInClassMethodsHandler < ::YARD::Handlers::Ruby::Base
|
97
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#23
|
98
|
-
sig { void }
|
99
|
-
def process; end
|
100
|
-
|
101
|
-
class << self
|
102
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#18
|
103
|
-
sig { params(code_obj: ::String).returns(T.nilable(::String)) }
|
104
|
-
def mixed_in_class_methods(code_obj); end
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
# A YARD Handler for Sorbet type declarations
|
109
|
-
#
|
110
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#7
|
111
|
-
class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base
|
112
|
-
# Swap the method definition docstring and the sig docstring.
|
113
|
-
# Parse relevant parts of the `sig` and include them as well.
|
114
|
-
#
|
115
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#20
|
116
|
-
sig { void }
|
117
|
-
def process; end
|
118
|
-
|
119
|
-
private
|
120
|
-
|
121
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#52
|
122
|
-
sig do
|
123
|
-
params(
|
124
|
-
method_node: ::YARD::Parser::Ruby::AstNode,
|
125
|
-
node: ::YARD::Parser::Ruby::AstNode,
|
126
|
-
docstring: ::YARD::Docstring
|
127
|
-
).void
|
128
|
-
end
|
129
|
-
def parse_params(method_node, node, docstring); end
|
130
|
-
|
131
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#64
|
132
|
-
sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void }
|
133
|
-
def parse_return(node, docstring); end
|
134
|
-
|
135
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#32
|
136
|
-
sig { params(method_node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void }
|
137
|
-
def parse_sig(method_node, docstring); end
|
138
|
-
end
|
139
|
-
|
140
|
-
# These node types attached to sigs represent attr_* declarations
|
141
|
-
#
|
142
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#14
|
143
|
-
YARDSorbet::Handlers::SigHandler::ATTR_NODE_TYPES = T.let(T.unsafe(nil), Array)
|
144
|
-
|
145
|
-
# Class-level handler that folds all `const` and `prop` declarations into the constructor documentation
|
146
|
-
# this needs to be injected as a module otherwise the default Class handler will overwrite documentation
|
147
|
-
#
|
148
|
-
# @note this module is included in `YARD::Handlers::Ruby::ClassHandler`
|
149
|
-
#
|
150
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#10
|
151
|
-
module YARDSorbet::Handlers::StructClassHandler
|
152
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#14
|
153
|
-
sig { void }
|
154
|
-
def process; end
|
155
|
-
|
156
|
-
private
|
157
|
-
|
158
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#50
|
159
|
-
sig do
|
160
|
-
params(
|
161
|
-
object: ::YARD::CodeObjects::MethodObject,
|
162
|
-
props: T::Array[::YARDSorbet::TStructProp],
|
163
|
-
docstring: ::YARD::Docstring,
|
164
|
-
directives: T::Array[::String]
|
165
|
-
).void
|
166
|
-
end
|
167
|
-
def decorate_t_struct_init(object, props, docstring, directives); end
|
168
|
-
|
169
|
-
# Create a virtual `initialize` method with all the `prop`/`const` arguments
|
170
|
-
#
|
171
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#30
|
172
|
-
sig { params(props: T::Array[::YARDSorbet::TStructProp], class_ns: ::YARD::CodeObjects::ClassObject).void }
|
173
|
-
def process_t_struct_props(props, class_ns); end
|
174
|
-
|
175
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#60
|
176
|
-
sig { params(props: T::Array[::YARDSorbet::TStructProp]).returns(T::Array[[::String, T.nilable(::String)]]) }
|
177
|
-
def to_object_parameters(props); end
|
178
|
-
end
|
179
|
-
|
180
|
-
# Handles all `const`/`prop` calls, creating accessor methods, and compiles them for later usage at the class level
|
181
|
-
# in creating a constructor
|
182
|
-
#
|
183
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#8
|
184
|
-
class YARDSorbet::Handlers::StructPropHandler < ::YARD::Handlers::Ruby::Base
|
185
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#15
|
186
|
-
sig { void }
|
187
|
-
def process; end
|
188
|
-
|
189
|
-
private
|
190
|
-
|
191
|
-
# Add the source and docstring to the method object
|
192
|
-
#
|
193
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#28
|
194
|
-
sig { params(object: ::YARD::CodeObjects::MethodObject, prop: ::YARDSorbet::TStructProp).void }
|
195
|
-
def decorate_object(object, prop); end
|
196
|
-
|
197
|
-
# Get the default prop value
|
198
|
-
#
|
199
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#39
|
200
|
-
sig { returns(T.nilable(::String)) }
|
201
|
-
def default_value; end
|
202
|
-
|
203
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#44
|
204
|
-
sig { params(name: ::String).returns(::YARDSorbet::TStructProp) }
|
205
|
-
def make_prop(name); end
|
206
|
-
|
207
|
-
# Register the field explicitly as an attribute.
|
208
|
-
# While `const` attributes are immutable, `prop` attributes may be reassigned.
|
209
|
-
#
|
210
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#57
|
211
|
-
sig { params(object: ::YARD::CodeObjects::MethodObject, name: ::String).void }
|
212
|
-
def register_attrs(object, name); end
|
213
|
-
|
214
|
-
# Store the prop for use in the constructor definition
|
215
|
-
#
|
216
|
-
# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#65
|
217
|
-
sig { params(prop: ::YARDSorbet::TStructProp).void }
|
218
|
-
def update_state(prop); end
|
219
|
-
end
|
220
|
-
|
221
|
-
# Helper methods for working with `YARD` AST Nodes
|
222
|
-
#
|
223
|
-
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#6
|
224
|
-
module YARDSorbet::NodeUtils
|
225
|
-
class << self
|
226
|
-
# Traverse AST nodes in breadth-first order
|
227
|
-
#
|
228
|
-
# @note This will skip over some node types.
|
229
|
-
# @yield [YARD::Parser::Ruby::AstNode]
|
230
|
-
#
|
231
|
-
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#22
|
232
|
-
sig do
|
233
|
-
params(
|
234
|
-
node: ::YARD::Parser::Ruby::AstNode,
|
235
|
-
_blk: T.proc.params(n: ::YARD::Parser::Ruby::AstNode).void
|
236
|
-
).void
|
237
|
-
end
|
238
|
-
def bfs_traverse(node, &_blk); end
|
239
|
-
|
240
|
-
# Gets the node that a sorbet `sig` can be attached do, bypassing visisbility modifiers and the like
|
241
|
-
#
|
242
|
-
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#34
|
243
|
-
sig do
|
244
|
-
params(
|
245
|
-
node: ::YARD::Parser::Ruby::AstNode
|
246
|
-
).returns(T.any(::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode))
|
247
|
-
end
|
248
|
-
def get_method_node(node); end
|
249
|
-
|
250
|
-
# Find and return the adjacent node (ascending)
|
251
|
-
#
|
252
|
-
# @raise [IndexError] if the node does not have an adjacent sibling (ascending)
|
253
|
-
#
|
254
|
-
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#48
|
255
|
-
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::YARD::Parser::Ruby::AstNode) }
|
256
|
-
def sibling_node(node); end
|
257
|
-
end
|
258
|
-
end
|
259
|
-
|
260
|
-
# Command node types that can have type signatures
|
261
|
-
#
|
262
|
-
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#10
|
263
|
-
YARDSorbet::NodeUtils::ATTRIBUTE_METHODS = T.let(T.unsafe(nil), Array)
|
264
|
-
|
265
|
-
# Skip these method contents during BFS node traversal, they can have their own nested types via `T.Proc`
|
266
|
-
#
|
267
|
-
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#12
|
268
|
-
YARDSorbet::NodeUtils::SKIP_METHOD_CONTENTS = T.let(T.unsafe(nil), Array)
|
269
|
-
|
270
|
-
# Node types that can have type signatures
|
271
|
-
#
|
272
|
-
# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#14
|
273
|
-
YARDSorbet::NodeUtils::SigableNode = T.type_alias { T.any(::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode) }
|
274
|
-
|
275
|
-
# Translate `sig` type syntax to `YARD` type syntax.
|
276
|
-
#
|
277
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#6
|
278
|
-
module YARDSorbet::SigToYARD
|
279
|
-
class << self
|
280
|
-
# @see https://yardoc.org/types.html
|
281
|
-
#
|
282
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#21
|
283
|
-
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
|
284
|
-
def convert(node); end
|
285
|
-
|
286
|
-
private
|
287
|
-
|
288
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#54
|
289
|
-
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::String) }
|
290
|
-
def build_generic_type(node); end
|
291
|
-
|
292
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#63
|
293
|
-
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
|
294
|
-
def convert_aref(node); end
|
295
|
-
|
296
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#75
|
297
|
-
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
|
298
|
-
def convert_array(node); end
|
299
|
-
|
300
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#83
|
301
|
-
sig { params(node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) }
|
302
|
-
def convert_call(node); end
|
303
|
-
|
304
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#88
|
305
|
-
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
|
306
|
-
def convert_collection(node); end
|
307
|
-
|
308
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#95
|
309
|
-
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
|
310
|
-
def convert_hash(node); end
|
311
|
-
|
312
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#103
|
313
|
-
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
|
314
|
-
def convert_list(node); end
|
315
|
-
|
316
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#27
|
317
|
-
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
|
318
|
-
def convert_node(node); end
|
319
|
-
|
320
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#36
|
321
|
-
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
|
322
|
-
def convert_node_type(node); end
|
323
|
-
|
324
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#108
|
325
|
-
sig { params(node_source: ::String).returns([::String]) }
|
326
|
-
def convert_ref(node_source); end
|
327
|
-
|
328
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#113
|
329
|
-
sig { params(node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) }
|
330
|
-
def convert_t_method(node); end
|
331
|
-
|
332
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#125
|
333
|
-
sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
|
334
|
-
def convert_unknown(node); end
|
335
|
-
end
|
336
|
-
end
|
337
|
-
|
338
|
-
# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#9
|
339
|
-
YARDSorbet::SigToYARD::REF_TYPES = T.let(T.unsafe(nil), Hash)
|
340
|
-
|
341
|
-
# Used to store the details of a `T::Struct` `prop` definition
|
342
|
-
#
|
343
|
-
# source://yard-sorbet//lib/yard-sorbet/t_struct_prop.rb#6
|
344
|
-
class YARDSorbet::TStructProp < ::T::Struct
|
345
|
-
const :default, T.nilable(::String)
|
346
|
-
const :doc, ::String
|
347
|
-
const :prop_name, ::String
|
348
|
-
const :source, ::String
|
349
|
-
const :types, T::Array[::String]
|
350
|
-
|
351
|
-
class << self
|
352
|
-
# source://sorbet-runtime/0.5.10595/lib/types/struct.rb#13
|
353
|
-
def inherited(s); end
|
354
|
-
end
|
355
|
-
end
|
356
|
-
|
357
|
-
# Helper methods for working with `YARD` tags
|
358
|
-
#
|
359
|
-
# source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#6
|
360
|
-
module YARDSorbet::TagUtils
|
361
|
-
class << self
|
362
|
-
# source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#13
|
363
|
-
sig do
|
364
|
-
params(
|
365
|
-
docstring: ::YARD::Docstring,
|
366
|
-
tag_name: ::String,
|
367
|
-
name: T.nilable(::String)
|
368
|
-
).returns(T.nilable(::YARD::Tags::Tag))
|
369
|
-
end
|
370
|
-
def find_tag(docstring, tag_name, name); end
|
371
|
-
|
372
|
-
# Create or update a `YARD` tag with type information
|
373
|
-
#
|
374
|
-
# source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#27
|
375
|
-
sig do
|
376
|
-
params(
|
377
|
-
docstring: ::YARD::Docstring,
|
378
|
-
tag_name: ::String,
|
379
|
-
types: T.nilable(T::Array[::String]),
|
380
|
-
name: T.nilable(::String),
|
381
|
-
text: ::String
|
382
|
-
).void
|
383
|
-
end
|
384
|
-
def upsert_tag(docstring, tag_name, types = T.unsafe(nil), name = T.unsafe(nil), text = T.unsafe(nil)); end
|
385
|
-
end
|
386
|
-
end
|
387
|
-
|
388
|
-
# {https://rubygems.org/gems/yard-sorbet Version history}
|
389
|
-
#
|
390
|
-
# source://yard-sorbet//lib/yard-sorbet/version.rb#7
|
391
|
-
YARDSorbet::VERSION = T.let(T.unsafe(nil), String)
|