esquema 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +4 -1
  3. data/CHANGELOG.md +9 -1
  4. data/README.md +8 -2
  5. data/lib/esquema/builder.rb +73 -28
  6. data/lib/esquema/configuration.rb +2 -1
  7. data/lib/esquema/keyword_validator.rb +98 -0
  8. data/lib/esquema/model.rb +4 -0
  9. data/lib/esquema/property.rb +185 -26
  10. data/lib/esquema/schema_enhancer.rb +55 -30
  11. data/lib/esquema/type_caster.rb +16 -4
  12. data/lib/esquema/version.rb +1 -1
  13. data/lib/esquema/virtual_column.rb +46 -0
  14. data/lib/esquema.rb +7 -1
  15. data/lib/generators/esquema/install/install_generator.rb +1 -0
  16. data/sorbet/config +4 -0
  17. data/sorbet/rbi/annotations/.gitattributes +1 -0
  18. data/sorbet/rbi/annotations/activemodel.rbi +89 -0
  19. data/sorbet/rbi/annotations/activerecord.rbi +92 -0
  20. data/sorbet/rbi/annotations/activesupport.rbi +421 -0
  21. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  22. data/sorbet/rbi/gems/.gitattributes +1 -0
  23. data/sorbet/rbi/gems/activemodel@7.1.3.rbi +8 -0
  24. data/sorbet/rbi/gems/activerecord@7.1.3.rbi +8 -0
  25. data/sorbet/rbi/gems/activesupport@7.1.3.rbi +192 -0
  26. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  27. data/sorbet/rbi/gems/base64@0.2.0.rbi +8 -0
  28. data/sorbet/rbi/gems/bigdecimal@3.1.6.rbi +8 -0
  29. data/sorbet/rbi/gems/byebug@11.1.3.rbi +3606 -0
  30. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
  31. data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +8 -0
  32. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +8 -0
  33. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +1130 -0
  34. data/sorbet/rbi/gems/drb@2.2.0.rbi +1272 -0
  35. data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
  36. data/sorbet/rbi/gems/i18n@1.14.1.rbi +8 -0
  37. data/sorbet/rbi/gems/json@2.7.1.rbi +1553 -0
  38. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
  39. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  40. data/sorbet/rbi/gems/minitest@5.22.2.rbi +8 -0
  41. data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +8 -0
  42. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  43. data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
  44. data/sorbet/rbi/gems/parser@3.3.0.5.rbi +5472 -0
  45. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
  46. data/sorbet/rbi/gems/prism@0.24.0.rbi +31040 -0
  47. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1150 -0
  48. data/sorbet/rbi/gems/pry@0.14.2.rbi +10075 -0
  49. data/sorbet/rbi/gems/racc@1.7.3.rbi +157 -0
  50. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
  51. data/sorbet/rbi/gems/rake@13.1.0.rbi +3027 -0
  52. data/sorbet/rbi/gems/rbi@0.1.9.rbi +3006 -0
  53. data/sorbet/rbi/gems/regexp_parser@2.9.0.rbi +3771 -0
  54. data/sorbet/rbi/gems/rexml@3.2.6.rbi +4781 -0
  55. data/sorbet/rbi/gems/rspec-core@3.13.0.rbi +10978 -0
  56. data/sorbet/rbi/gems/rspec-expectations@3.13.0.rbi +8153 -0
  57. data/sorbet/rbi/gems/rspec-mocks@3.13.0.rbi +5340 -0
  58. data/sorbet/rbi/gems/rspec-support@3.13.0.rbi +1629 -0
  59. data/sorbet/rbi/gems/rspec@3.13.0.rbi +82 -0
  60. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7006 -0
  61. data/sorbet/rbi/gems/rubocop@1.60.2.rbi +57383 -0
  62. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
  63. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
  64. data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
  65. data/sorbet/rbi/gems/sqlite3@1.7.2.rbi +1691 -0
  66. data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23133 -0
  67. data/sorbet/rbi/gems/tapioca@0.12.0.rbi +3510 -0
  68. data/sorbet/rbi/gems/thor@1.3.0.rbi +4345 -0
  69. data/sorbet/rbi/gems/timeout@0.4.1.rbi +142 -0
  70. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +8 -0
  71. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
  72. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  73. data/sorbet/rbi/gems/yard@0.9.34.rbi +18219 -0
  74. data/sorbet/rbi/todo.rbi +20 -0
  75. data/sorbet/tapioca/config.yml +13 -0
  76. data/sorbet/tapioca/require.rb +4 -0
  77. metadata +72 -10
  78. data/esquema.gemspec +0 -38
@@ -0,0 +1,142 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `timeout` gem.
5
+ # Please instead update this file by running `bin/tapioca gem timeout`.
6
+
7
+ module Timeout
8
+ private
9
+
10
+ # Perform an operation in a block, raising an error if it takes longer than
11
+ # +sec+ seconds to complete.
12
+ #
13
+ # +sec+:: Number of seconds to wait for the block to terminate. Any number
14
+ # may be used, including Floats to specify fractional seconds. A
15
+ # value of 0 or +nil+ will execute the block without any timeout.
16
+ # +klass+:: Exception Class to raise if the block fails to terminate
17
+ # in +sec+ seconds. Omitting will use the default, Timeout::Error
18
+ # +message+:: Error message to raise with Exception Class.
19
+ # Omitting will use the default, "execution expired"
20
+ #
21
+ # Returns the result of the block *if* the block completed before
22
+ # +sec+ seconds, otherwise throws an exception, based on the value of +klass+.
23
+ #
24
+ # The exception thrown to terminate the given block cannot be rescued inside
25
+ # the block unless +klass+ is given explicitly. However, the block can use
26
+ # ensure to prevent the handling of the exception. For that reason, this
27
+ # method cannot be relied on to enforce timeouts for untrusted blocks.
28
+ #
29
+ # If a scheduler is defined, it will be used to handle the timeout by invoking
30
+ # Scheduler#timeout_after.
31
+ #
32
+ # Note that this is both a method of module Timeout, so you can <tt>include
33
+ # Timeout</tt> into your classes so they have a #timeout method, as well as
34
+ # a module method, so you can call it directly as Timeout.timeout().
35
+ #
36
+ # source://timeout//timeout.rb#169
37
+ def timeout(sec, klass = T.unsafe(nil), message = T.unsafe(nil), &block); end
38
+
39
+ class << self
40
+ # source://timeout//timeout.rb#127
41
+ def ensure_timeout_thread_created; end
42
+
43
+ # Perform an operation in a block, raising an error if it takes longer than
44
+ # +sec+ seconds to complete.
45
+ #
46
+ # +sec+:: Number of seconds to wait for the block to terminate. Any number
47
+ # may be used, including Floats to specify fractional seconds. A
48
+ # value of 0 or +nil+ will execute the block without any timeout.
49
+ # +klass+:: Exception Class to raise if the block fails to terminate
50
+ # in +sec+ seconds. Omitting will use the default, Timeout::Error
51
+ # +message+:: Error message to raise with Exception Class.
52
+ # Omitting will use the default, "execution expired"
53
+ #
54
+ # Returns the result of the block *if* the block completed before
55
+ # +sec+ seconds, otherwise throws an exception, based on the value of +klass+.
56
+ #
57
+ # The exception thrown to terminate the given block cannot be rescued inside
58
+ # the block unless +klass+ is given explicitly. However, the block can use
59
+ # ensure to prevent the handling of the exception. For that reason, this
60
+ # method cannot be relied on to enforce timeouts for untrusted blocks.
61
+ #
62
+ # If a scheduler is defined, it will be used to handle the timeout by invoking
63
+ # Scheduler#timeout_after.
64
+ #
65
+ # Note that this is both a method of module Timeout, so you can <tt>include
66
+ # Timeout</tt> into your classes so they have a #timeout method, as well as
67
+ # a module method, so you can call it directly as Timeout.timeout().
68
+ #
69
+ # source://timeout//timeout.rb#169
70
+ def timeout(sec, klass = T.unsafe(nil), message = T.unsafe(nil), &block); end
71
+
72
+ private
73
+
74
+ # source://timeout//timeout.rb#97
75
+ def create_timeout_thread; end
76
+ end
77
+ end
78
+
79
+ # :stopdoc:
80
+ #
81
+ # source://timeout//timeout.rb#50
82
+ Timeout::CONDVAR = T.let(T.unsafe(nil), Thread::ConditionVariable)
83
+
84
+ # Raised by Timeout.timeout when the block times out.
85
+ class Timeout::Error < ::RuntimeError
86
+ class << self
87
+ # source://timeout//timeout.rb#37
88
+ def handle_timeout(message); end
89
+ end
90
+ end
91
+
92
+ # Internal error raised to when a timeout is triggered.
93
+ class Timeout::ExitException < ::Exception
94
+ # source://timeout//timeout.rb#30
95
+ def exception(*_arg0); end
96
+ end
97
+
98
+ # We keep a private reference so that time mocking libraries won't break
99
+ # Timeout.
100
+ #
101
+ # source://timeout//timeout.rb#139
102
+ Timeout::GET_TIME = T.let(T.unsafe(nil), Method)
103
+
104
+ # source://timeout//timeout.rb#51
105
+ Timeout::QUEUE = T.let(T.unsafe(nil), Thread::Queue)
106
+
107
+ # source://timeout//timeout.rb#52
108
+ Timeout::QUEUE_MUTEX = T.let(T.unsafe(nil), Thread::Mutex)
109
+
110
+ class Timeout::Request
111
+ # @return [Request] a new instance of Request
112
+ #
113
+ # source://timeout//timeout.rb#60
114
+ def initialize(thread, timeout, exception_class, message); end
115
+
116
+ # Returns the value of attribute deadline.
117
+ #
118
+ # source://timeout//timeout.rb#58
119
+ def deadline; end
120
+
121
+ # @return [Boolean]
122
+ #
123
+ # source://timeout//timeout.rb#70
124
+ def done?; end
125
+
126
+ # @return [Boolean]
127
+ #
128
+ # source://timeout//timeout.rb#76
129
+ def expired?(now); end
130
+
131
+ # source://timeout//timeout.rb#89
132
+ def finished; end
133
+
134
+ # source://timeout//timeout.rb#80
135
+ def interrupt; end
136
+ end
137
+
138
+ # source://timeout//timeout.rb#53
139
+ Timeout::TIMEOUT_THREAD_MUTEX = T.let(T.unsafe(nil), Thread::Mutex)
140
+
141
+ # source://timeout//timeout.rb#26
142
+ Timeout::VERSION = T.let(T.unsafe(nil), String)
@@ -0,0 +1,8 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `tzinfo` gem.
5
+ # Please instead update this file by running `bin/tapioca gem tzinfo`.
6
+
7
+ # THIS IS AN EMPTY RBI FILE.
8
+ # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
@@ -0,0 +1,65 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `unicode-display_width` gem.
5
+ # Please instead update this file by running `bin/tapioca gem unicode-display_width`.
6
+
7
+ # source://unicode-display_width//lib/unicode/display_width/constants.rb#3
8
+ module Unicode; end
9
+
10
+ # source://unicode-display_width//lib/unicode/display_width/constants.rb#4
11
+ class Unicode::DisplayWidth
12
+ # @return [DisplayWidth] a new instance of DisplayWidth
13
+ #
14
+ # source://unicode-display_width//lib/unicode/display_width.rb#104
15
+ def initialize(ambiguous: T.unsafe(nil), overwrite: T.unsafe(nil), emoji: T.unsafe(nil)); end
16
+
17
+ # source://unicode-display_width//lib/unicode/display_width.rb#110
18
+ def get_config(**kwargs); end
19
+
20
+ # source://unicode-display_width//lib/unicode/display_width.rb#118
21
+ def of(string, **kwargs); end
22
+
23
+ class << self
24
+ # source://unicode-display_width//lib/unicode/display_width/index.rb#14
25
+ def decompress_index(index, level); end
26
+
27
+ # source://unicode-display_width//lib/unicode/display_width.rb#86
28
+ def emoji_extra_width_of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), _ = T.unsafe(nil)); end
29
+
30
+ # source://unicode-display_width//lib/unicode/display_width.rb#12
31
+ def of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), options = T.unsafe(nil)); end
32
+
33
+ # Same as .width_no_overwrite - but with applying overwrites for each char
34
+ #
35
+ # source://unicode-display_width//lib/unicode/display_width.rb#57
36
+ def width_all_features(string, ambiguous, overwrite, options); end
37
+
38
+ # source://unicode-display_width//lib/unicode/display_width.rb#30
39
+ def width_no_overwrite(string, ambiguous, options = T.unsafe(nil)); end
40
+ end
41
+ end
42
+
43
+ # source://unicode-display_width//lib/unicode/display_width.rb#9
44
+ Unicode::DisplayWidth::ASCII_NON_ZERO_REGEX = T.let(T.unsafe(nil), Regexp)
45
+
46
+ # source://unicode-display_width//lib/unicode/display_width/constants.rb#7
47
+ Unicode::DisplayWidth::DATA_DIRECTORY = T.let(T.unsafe(nil), String)
48
+
49
+ # source://unicode-display_width//lib/unicode/display_width.rb#10
50
+ Unicode::DisplayWidth::FIRST_4096 = T.let(T.unsafe(nil), Array)
51
+
52
+ # source://unicode-display_width//lib/unicode/display_width/index.rb#11
53
+ Unicode::DisplayWidth::INDEX = T.let(T.unsafe(nil), Array)
54
+
55
+ # source://unicode-display_width//lib/unicode/display_width/constants.rb#8
56
+ Unicode::DisplayWidth::INDEX_FILENAME = T.let(T.unsafe(nil), String)
57
+
58
+ # source://unicode-display_width//lib/unicode/display_width.rb#8
59
+ Unicode::DisplayWidth::INITIAL_DEPTH = T.let(T.unsafe(nil), Integer)
60
+
61
+ # source://unicode-display_width//lib/unicode/display_width/constants.rb#6
62
+ Unicode::DisplayWidth::UNICODE_VERSION = T.let(T.unsafe(nil), String)
63
+
64
+ # source://unicode-display_width//lib/unicode/display_width/constants.rb#5
65
+ Unicode::DisplayWidth::VERSION = T.let(T.unsafe(nil), String)
@@ -0,0 +1,428 @@
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#28
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(T::Array[::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#24
116
+ sig { void }
117
+ def process; end
118
+
119
+ private
120
+
121
+ # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#73
122
+ sig { params(method_objects: T::Array[::YARD::CodeObjects::MethodObject]).void }
123
+ def document_attr_methods(method_objects); end
124
+
125
+ # An attr* sig can be merged into a previous attr* docstring if it is the only parameter passed to the attr*
126
+ # declaration. This is to avoid needing to rewrite the source code to separate merged and unmerged attr*
127
+ # declarations.
128
+ #
129
+ # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#60
130
+ sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Boolean) }
131
+ def merged_into_attr?(attr_node); end
132
+
133
+ # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#78
134
+ sig do
135
+ params(
136
+ attach_to: T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode),
137
+ docstring: T.nilable(::String),
138
+ include_params: T::Boolean
139
+ ).void
140
+ end
141
+ def parse_node(attach_to, docstring, include_params: T.unsafe(nil)); end
142
+
143
+ # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#99
144
+ sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void }
145
+ def parse_params(node, docstring); end
146
+
147
+ # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#109
148
+ sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void }
149
+ def parse_return(node, docstring); end
150
+
151
+ # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#87
152
+ sig { params(docstring: ::YARD::Docstring, include_params: T::Boolean).void }
153
+ def parse_sig(docstring, include_params: T.unsafe(nil)); end
154
+
155
+ # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#50
156
+ sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).void }
157
+ def process_attr(attr_node); end
158
+
159
+ # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#36
160
+ sig { params(def_node: ::YARD::Parser::Ruby::MethodDefinitionNode).void }
161
+ def process_def(def_node); end
162
+ end
163
+
164
+ # YARD types that can have docstrings attached to them
165
+ #
166
+ # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#14
167
+ YARDSorbet::Handlers::SigHandler::Documentable = T.type_alias { T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode) }
168
+
169
+ # Class-level handler that folds all `const` and `prop` declarations into the constructor documentation
170
+ # this needs to be injected as a module otherwise the default Class handler will overwrite documentation
171
+ #
172
+ # @note this module is included in `YARD::Handlers::Ruby::ClassHandler`
173
+ #
174
+ # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#10
175
+ module YARDSorbet::Handlers::StructClassHandler
176
+ # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#14
177
+ sig { void }
178
+ def process; end
179
+
180
+ private
181
+
182
+ # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#50
183
+ sig do
184
+ params(
185
+ object: ::YARD::CodeObjects::MethodObject,
186
+ props: T::Array[::YARDSorbet::TStructProp],
187
+ docstring: ::YARD::Docstring,
188
+ directives: T::Array[::String]
189
+ ).void
190
+ end
191
+ def decorate_t_struct_init(object, props, docstring, directives); end
192
+
193
+ # Create a virtual `initialize` method with all the `prop`/`const` arguments
194
+ #
195
+ # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#30
196
+ sig { params(props: T::Array[::YARDSorbet::TStructProp], class_ns: ::YARD::CodeObjects::ClassObject).void }
197
+ def process_t_struct_props(props, class_ns); end
198
+
199
+ # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#60
200
+ sig { params(props: T::Array[::YARDSorbet::TStructProp]).returns(T::Array[[::String, T.nilable(::String)]]) }
201
+ def to_object_parameters(props); end
202
+ end
203
+
204
+ # Handles all `const`/`prop` calls, creating accessor methods, and compiles them for later usage at the class level
205
+ # in creating a constructor
206
+ #
207
+ # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#8
208
+ class YARDSorbet::Handlers::StructPropHandler < ::YARD::Handlers::Ruby::Base
209
+ # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#15
210
+ sig { void }
211
+ def process; end
212
+
213
+ private
214
+
215
+ # Add the source and docstring to the method object
216
+ #
217
+ # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#28
218
+ sig { params(object: ::YARD::CodeObjects::MethodObject, prop: ::YARDSorbet::TStructProp).void }
219
+ def decorate_object(object, prop); end
220
+
221
+ # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#38
222
+ sig { returns(T::Boolean) }
223
+ def immutable?; end
224
+
225
+ # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#44
226
+ sig { params(kwd: ::String).returns(T.nilable(::String)) }
227
+ def kw_arg(kwd); end
228
+
229
+ # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#49
230
+ sig { params(name: ::String).returns(::YARDSorbet::TStructProp) }
231
+ def make_prop(name); end
232
+
233
+ # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#60
234
+ sig { returns(T::Array[::YARD::Parser::Ruby::AstNode]) }
235
+ def params; end
236
+
237
+ # Register the field explicitly as an attribute.
238
+ #
239
+ # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#66
240
+ sig { params(object: ::YARD::CodeObjects::MethodObject, name: ::String).void }
241
+ def register_attrs(object, name); end
242
+
243
+ # Store the prop for use in the constructor definition
244
+ #
245
+ # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#74
246
+ sig { params(prop: ::YARDSorbet::TStructProp).void }
247
+ def update_state(prop); end
248
+ end
249
+
250
+ # Helper methods for working with `YARD` AST Nodes
251
+ #
252
+ # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#6
253
+ module YARDSorbet::NodeUtils
254
+ class << self
255
+ # Traverse AST nodes in breadth-first order
256
+ #
257
+ # @note This will skip over some node types.
258
+ # @yield [YARD::Parser::Ruby::AstNode]
259
+ #
260
+ # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#21
261
+ sig do
262
+ params(
263
+ node: ::YARD::Parser::Ruby::AstNode,
264
+ _blk: T.proc.params(n: ::YARD::Parser::Ruby::AstNode).void
265
+ ).void
266
+ end
267
+ def bfs_traverse(node, &_blk); end
268
+
269
+ # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#32
270
+ sig { params(node: ::YARD::Parser::Ruby::AstNode).void }
271
+ def delete_node(node); end
272
+
273
+ # Gets the node that a sorbet `sig` can be attached do, bypassing visisbility modifiers and the like
274
+ #
275
+ # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#38
276
+ sig do
277
+ params(
278
+ node: ::YARD::Parser::Ruby::AstNode
279
+ ).returns(T.any(::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode))
280
+ end
281
+ def get_method_node(node); end
282
+
283
+ # Find and return the adjacent node (ascending)
284
+ #
285
+ # @raise [IndexError] if the node does not have an adjacent sibling (ascending)
286
+ #
287
+ # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#45
288
+ sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::YARD::Parser::Ruby::AstNode) }
289
+ def sibling_node(node); end
290
+
291
+ # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#52
292
+ sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) }
293
+ def sigable_node?(node); end
294
+
295
+ # @see https://github.com/lsegal/yard/blob/main/lib/yard/handlers/ruby/attribute_handler.rb YARD::Handlers::Ruby::AttributeHandler.validated_attribute_names
296
+ #
297
+ # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#63
298
+ sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) }
299
+ def validated_attribute_names(attr_node); end
300
+ end
301
+ end
302
+
303
+ # Command node types that can have type signatures
304
+ #
305
+ # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#10
306
+ YARDSorbet::NodeUtils::ATTRIBUTE_METHODS = T.let(T.unsafe(nil), Array)
307
+
308
+ # Skip these method contents during BFS node traversal, they can have their own nested types via `T.Proc`
309
+ #
310
+ # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#12
311
+ YARDSorbet::NodeUtils::SKIP_METHOD_CONTENTS = T.let(T.unsafe(nil), Array)
312
+
313
+ # Node types that can have type signatures
314
+ #
315
+ # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#14
316
+ YARDSorbet::NodeUtils::SigableNode = T.type_alias { T.any(::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode) }
317
+
318
+ # Translate `sig` type syntax to `YARD` type syntax.
319
+ #
320
+ # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#6
321
+ module YARDSorbet::SigToYARD
322
+ class << self
323
+ # @see https://yardoc.org/types.html
324
+ #
325
+ # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#23
326
+ sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
327
+ def convert(node); end
328
+
329
+ private
330
+
331
+ # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#61
332
+ sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::String) }
333
+ def build_generic_type(node); end
334
+
335
+ # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#70
336
+ sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
337
+ def convert_aref(node); end
338
+
339
+ # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#82
340
+ sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
341
+ def convert_array(node); end
342
+
343
+ # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#90
344
+ sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
345
+ def convert_collection(node); end
346
+
347
+ # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#97
348
+ sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
349
+ def convert_hash(node); end
350
+
351
+ # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#105
352
+ sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
353
+ def convert_list(node); end
354
+
355
+ # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#31
356
+ sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
357
+ def convert_node(node); end
358
+
359
+ # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#43
360
+ sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
361
+ def convert_node_type(node); end
362
+
363
+ # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#110
364
+ sig { params(node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) }
365
+ def convert_t_method(node); end
366
+
367
+ # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#121
368
+ sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
369
+ def convert_unknown(node); end
370
+ end
371
+ end
372
+
373
+ # Used to store the details of a `T::Struct` `prop` definition
374
+ #
375
+ # source://yard-sorbet//lib/yard-sorbet/t_struct_prop.rb#6
376
+ class YARDSorbet::TStructProp < ::T::Struct
377
+ const :default, T.nilable(::String)
378
+ const :doc, ::String
379
+ const :prop_name, ::String
380
+ const :source, ::String
381
+ const :types, T::Array[::String]
382
+
383
+ class << self
384
+ # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
385
+ def inherited(s); end
386
+ end
387
+ end
388
+
389
+ # Helper methods for working with `YARD` tags
390
+ #
391
+ # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#6
392
+ module YARDSorbet::TagUtils
393
+ class << self
394
+ # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#16
395
+ sig do
396
+ params(
397
+ docstring: ::YARD::Docstring,
398
+ tag_name: ::String,
399
+ name: T.nilable(::String)
400
+ ).returns(T.nilable(::YARD::Tags::Tag))
401
+ end
402
+ def find_tag(docstring, tag_name, name); end
403
+
404
+ # Create or update a `YARD` tag with type information
405
+ #
406
+ # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#30
407
+ sig do
408
+ params(
409
+ docstring: ::YARD::Docstring,
410
+ tag_name: ::String,
411
+ types: T.nilable(T::Array[::String]),
412
+ name: T.nilable(::String),
413
+ text: ::String
414
+ ).void
415
+ end
416
+ def upsert_tag(docstring, tag_name, types = T.unsafe(nil), name = T.unsafe(nil), text = T.unsafe(nil)); end
417
+ end
418
+ end
419
+
420
+ # The `void` return type, as a constant to reduce array allocations
421
+ #
422
+ # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#10
423
+ YARDSorbet::TagUtils::VOID_RETURN_TYPE = T.let(T.unsafe(nil), Array)
424
+
425
+ # {https://rubygems.org/gems/yard-sorbet Version history}
426
+ #
427
+ # source://yard-sorbet//lib/yard-sorbet/version.rb#7
428
+ YARDSorbet::VERSION = T.let(T.unsafe(nil), String)