titleist 0.1.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/tests.yml +19 -0
- data/.gitignore +1 -2
- data/.rubocop.yml +26 -1
- data/.ruby-version +1 -1
- data/Gemfile +13 -2
- data/README.md +95 -25
- data/Rakefile +17 -6
- data/docs/index.md +7 -0
- data/lib/generators/titleist/titleist_generator.rb +3 -0
- data/lib/titleist.rb +14 -9
- data/lib/titleist/controller.rb +36 -0
- data/lib/titleist/engine.rb +10 -4
- data/lib/titleist/helper.rb +23 -0
- data/lib/titleist/title.rb +52 -89
- data/lib/titleist/version.rb +5 -1
- data/rbi/sord.rbi +117 -0
- data/sorbet/config +2 -0
- data/sorbet/rbi/gems/actioncable.rbi +318 -0
- data/sorbet/rbi/gems/actionmailbox.rbi +56 -0
- data/sorbet/rbi/gems/actionmailer.rbi +446 -0
- data/sorbet/rbi/gems/actionpack.rbi +3411 -0
- data/sorbet/rbi/gems/actiontext.rbi +79 -0
- data/sorbet/rbi/gems/actionview.rbi +1185 -0
- data/sorbet/rbi/gems/activejob.rbi +362 -0
- data/sorbet/rbi/gems/activemodel.rbi +749 -0
- data/sorbet/rbi/gems/activerecord.rbi +5713 -0
- data/sorbet/rbi/gems/activestorage.rbi +221 -0
- data/sorbet/rbi/gems/activesupport.rbi +2437 -0
- data/sorbet/rbi/gems/addressable.rbi +146 -0
- data/sorbet/rbi/gems/ast.rbi +47 -0
- data/sorbet/rbi/gems/capybara.rbi +1787 -0
- data/sorbet/rbi/gems/childprocess.rbi +106 -0
- data/sorbet/rbi/gems/codeclimate-test-reporter.rbi +125 -0
- data/sorbet/rbi/gems/concurrent-ruby.rbi +1587 -0
- data/sorbet/rbi/gems/crass.rbi +92 -0
- data/sorbet/rbi/gems/docile.rbi +29 -0
- data/sorbet/rbi/gems/erubi.rbi +26 -0
- data/sorbet/rbi/gems/globalid.rbi +98 -0
- data/sorbet/rbi/gems/i18n.rbi +191 -0
- data/sorbet/rbi/gems/jaro_winkler.rbi +14 -0
- data/sorbet/rbi/gems/loofah.rbi +129 -0
- data/sorbet/rbi/gems/mail.rbi +1582 -0
- data/sorbet/rbi/gems/marcel.rbi +12 -0
- data/sorbet/rbi/gems/method_source.rbi +63 -0
- data/sorbet/rbi/gems/mini_mime.rbi +51 -0
- data/sorbet/rbi/gems/minitest.rbi +419 -0
- data/sorbet/rbi/gems/mocha.rbi +794 -0
- data/sorbet/rbi/gems/nio4r.rbi +67 -0
- data/sorbet/rbi/gems/nokogiri.rbi +1010 -0
- data/sorbet/rbi/gems/parallel.rbi +81 -0
- data/sorbet/rbi/gems/parser.rbi +920 -0
- data/sorbet/rbi/gems/public_suffix.rbi +103 -0
- data/sorbet/rbi/gems/puma.rbi +586 -0
- data/sorbet/rbi/gems/rack-test.rbi +161 -0
- data/sorbet/rbi/gems/rack.rbi +634 -0
- data/sorbet/rbi/gems/rails-dom-testing.rbi +67 -0
- data/sorbet/rbi/gems/rails-html-sanitizer.rbi +91 -0
- data/sorbet/rbi/gems/railties.rbi +834 -0
- data/sorbet/rbi/gems/rainbow.rbi +117 -0
- data/sorbet/rbi/gems/rake.rbi +269 -0
- data/sorbet/rbi/gems/regexp_parser.rbi +912 -0
- data/sorbet/rbi/gems/rubocop.rbi +7232 -0
- data/sorbet/rbi/gems/ruby-progressbar.rbi +304 -0
- data/sorbet/rbi/gems/rubyzip.rbi +546 -0
- data/sorbet/rbi/gems/selenium-webdriver.rbi +1450 -0
- data/sorbet/rbi/gems/simplecov-html.rbi +30 -0
- data/sorbet/rbi/gems/simplecov.rbi +189 -0
- data/sorbet/rbi/gems/site_ruby.rbi +265 -0
- data/sorbet/rbi/gems/sprockets-rails.rbi +105 -0
- data/sorbet/rbi/gems/sprockets.rbi +753 -0
- data/sorbet/rbi/gems/sqlite3.rbi +353 -0
- data/sorbet/rbi/gems/thor.rbi +579 -0
- data/sorbet/rbi/gems/thread_safe.rbi +81 -0
- data/sorbet/rbi/gems/tzinfo.rbi +405 -0
- data/sorbet/rbi/gems/unicode-display_width.rbi +16 -0
- data/sorbet/rbi/gems/webdrivers.rbi +155 -0
- data/sorbet/rbi/gems/xpath.rbi +158 -0
- data/sorbet/rbi/gems/yard.rbi +1159 -0
- data/sorbet/rbi/hidden-definitions/errors.txt +14957 -0
- data/sorbet/rbi/hidden-definitions/hidden.rbi +24898 -0
- data/sorbet/rbi/sorbet-typed/lib/actionmailer/all/actionmailer.rbi +13 -0
- data/sorbet/rbi/sorbet-typed/lib/actionpack/all/actionpack.rbi +938 -0
- data/sorbet/rbi/sorbet-typed/lib/actionview/all/actionview.rbi +314 -0
- data/sorbet/rbi/sorbet-typed/lib/activemodel/all/activemodel.rbi +425 -0
- data/sorbet/rbi/sorbet-typed/lib/activerecord/>=5.2/activerecord.rbi +17 -0
- data/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +1425 -0
- data/sorbet/rbi/sorbet-typed/lib/activerecord/~>6.0.0/activerecord.rbi +475 -0
- data/sorbet/rbi/sorbet-typed/lib/activestorage/>=6.0.0/activestorage.rbi +19 -0
- data/sorbet/rbi/sorbet-typed/lib/activestorage/all/activestorage.rbi +173 -0
- data/sorbet/rbi/sorbet-typed/lib/activesupport/>=6.0.0.rc1/activesupport.rbi +23 -0
- data/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +858 -0
- data/sorbet/rbi/sorbet-typed/lib/bundler/all/bundler.rbi +8684 -0
- data/sorbet/rbi/sorbet-typed/lib/minitest/all/minitest.rbi +108 -0
- data/sorbet/rbi/sorbet-typed/lib/railties/all/railties.rbi +25 -0
- data/sorbet/rbi/sorbet-typed/lib/rainbow/all/rainbow.rbi +254 -0
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/gem.rbi +4222 -0
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/open3.rbi +111 -0
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/resolv.rbi +543 -0
- data/sorbet/rbi/todo.rbi +20 -0
- data/titleist.gemspec +3 -14
- metadata +96 -155
- data/.travis.yml +0 -45
- data/app/controllers/.keep +0 -0
- data/app/helpers/.keep +0 -0
- data/app/helpers/titleist_helper.rb +0 -47
- data/app/mailers/.keep +0 -0
- data/app/models/.keep +0 -0
- data/app/views/.keep +0 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
# This file is autogenerated. Do not edit it by hand. Regenerate it with:
|
2
|
+
# srb rbi sorbet-typed
|
3
|
+
#
|
4
|
+
# If you would like to make changes to this file, great! Please upstream any changes you make here:
|
5
|
+
#
|
6
|
+
# https://github.com/sorbet/sorbet-typed/edit/master/lib/actionmailer/all/actionmailer.rbi
|
7
|
+
#
|
8
|
+
# typed: strong
|
9
|
+
|
10
|
+
class ActionMailer::Base
|
11
|
+
sig { params(headers: T.untyped).returns(Mail::Message) }
|
12
|
+
def mail(headers = nil, &block); end
|
13
|
+
end
|
@@ -0,0 +1,938 @@
|
|
1
|
+
# This file is autogenerated. Do not edit it by hand. Regenerate it with:
|
2
|
+
# srb rbi sorbet-typed
|
3
|
+
#
|
4
|
+
# If you would like to make changes to this file, great! Please upstream any changes you make here:
|
5
|
+
#
|
6
|
+
# https://github.com/sorbet/sorbet-typed/edit/master/lib/actionpack/all/actionpack.rbi
|
7
|
+
#
|
8
|
+
# typed: false
|
9
|
+
|
10
|
+
class ActionController::Base < ActionController::Metal
|
11
|
+
end
|
12
|
+
|
13
|
+
class AbstractController::Base < Object
|
14
|
+
end
|
15
|
+
|
16
|
+
class ActionController::Metal < AbstractController::Base
|
17
|
+
sig { returns(ActionDispatch::Request) }
|
18
|
+
def request(); end
|
19
|
+
|
20
|
+
sig { returns(ActionDispatch::Response) }
|
21
|
+
def response(); end
|
22
|
+
|
23
|
+
sig { returns(ActionController::Parameters) }
|
24
|
+
def params(); end
|
25
|
+
end
|
26
|
+
|
27
|
+
module ActionDispatch::Http::Parameters
|
28
|
+
sig { returns(ActionController::Parameters) }
|
29
|
+
def parameters(); end
|
30
|
+
|
31
|
+
# params is an alias of parameters
|
32
|
+
sig { returns(ActionController::Parameters) }
|
33
|
+
def params(); end
|
34
|
+
end
|
35
|
+
|
36
|
+
class ActionDispatch::Request
|
37
|
+
# Provides access to the request's HTTP headers, for example:
|
38
|
+
#
|
39
|
+
# ```ruby
|
40
|
+
# request.headers["Content-Type"] # => "text/plain"
|
41
|
+
# ```
|
42
|
+
sig { returns(ActionDispatch::Http::Headers) }
|
43
|
+
def headers; end
|
44
|
+
|
45
|
+
# Returns a `String` with the last requested path including their params.
|
46
|
+
#
|
47
|
+
# ```ruby
|
48
|
+
# # get '/foo'
|
49
|
+
# request.original_fullpath # => '/foo'
|
50
|
+
#
|
51
|
+
# # get '/foo?bar'
|
52
|
+
# request.original_fullpath # => '/foo?bar'
|
53
|
+
# ```
|
54
|
+
sig { returns(String) }
|
55
|
+
def original_fullpath; end
|
56
|
+
|
57
|
+
# Returns the `String` full path including params of the last URL requested.
|
58
|
+
#
|
59
|
+
# ```ruby
|
60
|
+
# # get "/articles"
|
61
|
+
# request.fullpath # => "/articles"
|
62
|
+
#
|
63
|
+
# # get "/articles?page=2"
|
64
|
+
# request.fullpath # => "/articles?page=2"
|
65
|
+
# ```
|
66
|
+
sig { returns(String) }
|
67
|
+
def fullpath; end
|
68
|
+
|
69
|
+
# Returns the original request URL as a `String`.
|
70
|
+
#
|
71
|
+
# ```ruby
|
72
|
+
# # get "/articles?page=2"
|
73
|
+
# request.original_url # => "http://www.example.com/articles?page=2"
|
74
|
+
# ```
|
75
|
+
sig { returns(String) }
|
76
|
+
def original_url; end
|
77
|
+
|
78
|
+
# The `String` MIME type of the request.
|
79
|
+
#
|
80
|
+
# ```
|
81
|
+
# # get "/articles"
|
82
|
+
# request.media_type # => "application/x-www-form-urlencoded"
|
83
|
+
# ```
|
84
|
+
sig { returns(String) }
|
85
|
+
def media_type; end
|
86
|
+
|
87
|
+
# Returns the content length of the request as an integer.
|
88
|
+
sig { returns(Integer) }
|
89
|
+
def content_length; end
|
90
|
+
|
91
|
+
# Returns the IP address of client as a `String`.
|
92
|
+
sig { returns(String) }
|
93
|
+
def ip; end
|
94
|
+
|
95
|
+
# Returns the IP address of client as a `String`,
|
96
|
+
# usually set by the RemoteIp middleware.
|
97
|
+
sig { returns(String) }
|
98
|
+
def remote_ip; end
|
99
|
+
|
100
|
+
# Returns the unique request id, which is based on either the X-Request-Id header that can
|
101
|
+
# be generated by a firewall, load balancer, or web server or by the RequestId middleware
|
102
|
+
# (which sets the action_dispatch.request_id environment variable).
|
103
|
+
#
|
104
|
+
# This unique ID is useful for tracing a request from end-to-end as part of logging or debugging.
|
105
|
+
# This relies on the Rack variable set by the ActionDispatch::RequestId middleware.
|
106
|
+
sig { returns(String) }
|
107
|
+
def request_id; end
|
108
|
+
|
109
|
+
# Returns true if the request has a header matching the given key parameter.
|
110
|
+
#
|
111
|
+
# ```ruby
|
112
|
+
# request.key? :ip_spoofing_check # => true
|
113
|
+
# ```
|
114
|
+
sig { params(key: Symbol).returns(T::Boolean) }
|
115
|
+
def key?(key); end
|
116
|
+
|
117
|
+
# True if the request came from localhost, 127.0.0.1, or ::1.
|
118
|
+
sig { returns(T::Boolean) }
|
119
|
+
def local?; end
|
120
|
+
end
|
121
|
+
|
122
|
+
class ActionDispatch::Response
|
123
|
+
end
|
124
|
+
|
125
|
+
class ActionDispatch::Http::Headers
|
126
|
+
end
|
127
|
+
|
128
|
+
class ActionController::Parameters
|
129
|
+
sig { params(other: ActionController::Parameters).returns(T::Boolean) }
|
130
|
+
def ==(other); end
|
131
|
+
|
132
|
+
sig { params(key: T.any(String, Symbol), value: T.untyped).void }
|
133
|
+
def []=(key, value); end
|
134
|
+
|
135
|
+
sig { returns(T.nilable(T::Array[T.any(String, Symbol)])) }
|
136
|
+
def always_permitted_parameters; end
|
137
|
+
|
138
|
+
sig { params(obj: T.nilable(T::Array[T.any(String, Symbol)])).void }
|
139
|
+
def always_permitted_parameters=(obj); end
|
140
|
+
|
141
|
+
sig { params(options: T.untyped).returns(T.untyped) }
|
142
|
+
def as_json(options = nil); end
|
143
|
+
|
144
|
+
sig { returns(T.untyped) }
|
145
|
+
def deep_dup; end
|
146
|
+
|
147
|
+
sig { params(key: T.any(String, Symbol), block: T.untyped).returns(T.untyped) }
|
148
|
+
def delete(key, &block); end
|
149
|
+
|
150
|
+
sig { params(keys: T.any(String, Symbol)).returns(T.untyped) }
|
151
|
+
def dig(*keys); end
|
152
|
+
|
153
|
+
sig { params(block: T.untyped).returns(T.untyped) }
|
154
|
+
def each_pair(&block); end
|
155
|
+
|
156
|
+
# each is an alias of each_pair
|
157
|
+
sig { params(block: T.untyped).returns(T.untyped) }
|
158
|
+
def each(&block); end
|
159
|
+
|
160
|
+
sig { returns(T::Boolean) }
|
161
|
+
def empty?; end
|
162
|
+
|
163
|
+
sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) }
|
164
|
+
def except(*keys); end
|
165
|
+
|
166
|
+
sig { params(keys: T.any(String, Symbol)).returns(T.untyped) }
|
167
|
+
def extract!(*keys); end
|
168
|
+
|
169
|
+
sig { params(key: T.any(String, Symbol), args: T.untyped).returns(T.untyped) }
|
170
|
+
def fetch(key, *args); end
|
171
|
+
|
172
|
+
sig { params(key: T.any(String, Symbol)).returns(T::Boolean) }
|
173
|
+
def has_key?(key); end
|
174
|
+
|
175
|
+
sig { params(value: T.untyped).returns(T::Boolean) }
|
176
|
+
def has_value?(value); end
|
177
|
+
|
178
|
+
sig { params(key: T.any(String, Symbol)).returns(T::Boolean) }
|
179
|
+
def include?(key); end
|
180
|
+
|
181
|
+
sig { params(parameters: T.untyped).void }
|
182
|
+
def initialize(parameters = nil); end
|
183
|
+
|
184
|
+
sig { returns(String) }
|
185
|
+
def inspect; end
|
186
|
+
|
187
|
+
sig { params(key: T.any(String, Symbol)).returns(T::Boolean) }
|
188
|
+
def key?(key); end
|
189
|
+
|
190
|
+
sig { returns(T::Array[T.untyped]) }
|
191
|
+
def keys; end
|
192
|
+
|
193
|
+
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
|
194
|
+
def merge!(other_hash); end
|
195
|
+
|
196
|
+
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
|
197
|
+
def merge(other_hash); end
|
198
|
+
|
199
|
+
sig { returns(T.untyped) }
|
200
|
+
def parameters; end
|
201
|
+
|
202
|
+
sig { returns(T.self_type) }
|
203
|
+
def permit!; end
|
204
|
+
|
205
|
+
# You can pass _a lot_ of stuff to permit, so filters is left untyped for now.
|
206
|
+
sig { params(filters: T.untyped).returns(ActionController::Parameters) }
|
207
|
+
def permit(*filters); end
|
208
|
+
|
209
|
+
sig { params(new_permitted: T.untyped).void }
|
210
|
+
def permitted=(new_permitted); end
|
211
|
+
|
212
|
+
sig { returns(T::Boolean) }
|
213
|
+
def permitted?; end
|
214
|
+
|
215
|
+
sig { params(block: T.untyped).returns(T.untyped) }
|
216
|
+
def reject!(&block); end
|
217
|
+
|
218
|
+
# delete_if is an alias of reject!
|
219
|
+
sig { params(block: T.untyped).returns(T.untyped) }
|
220
|
+
def delete_if(&block); end
|
221
|
+
|
222
|
+
sig { params(block: T.untyped).returns(T.untyped) }
|
223
|
+
def reject(&block); end
|
224
|
+
|
225
|
+
sig do
|
226
|
+
params(
|
227
|
+
key: T.any(String, Symbol),
|
228
|
+
).returns(
|
229
|
+
T.nilable(
|
230
|
+
T.any(
|
231
|
+
String,
|
232
|
+
Numeric,
|
233
|
+
ActionController::Parameters,
|
234
|
+
),
|
235
|
+
),
|
236
|
+
)
|
237
|
+
end
|
238
|
+
def [](key); end
|
239
|
+
|
240
|
+
sig do
|
241
|
+
params(
|
242
|
+
key: T.any(
|
243
|
+
String,
|
244
|
+
Symbol,
|
245
|
+
T::Array[T.any(String, Symbol)],
|
246
|
+
),
|
247
|
+
).returns(
|
248
|
+
T.any(
|
249
|
+
String,
|
250
|
+
Numeric,
|
251
|
+
T::Array[T.untyped],
|
252
|
+
ActionController::Parameters,
|
253
|
+
),
|
254
|
+
)
|
255
|
+
end
|
256
|
+
def require(key); end
|
257
|
+
|
258
|
+
# required is an alias of require
|
259
|
+
sig do
|
260
|
+
params(
|
261
|
+
key: T.any(
|
262
|
+
String,
|
263
|
+
Symbol,
|
264
|
+
T::Array[T.any(String, Symbol)],
|
265
|
+
),
|
266
|
+
).returns(
|
267
|
+
T.any(
|
268
|
+
String,
|
269
|
+
Numeric,
|
270
|
+
T::Array[T.untyped],
|
271
|
+
ActionController::Parameters,
|
272
|
+
),
|
273
|
+
)
|
274
|
+
end
|
275
|
+
def required(key); end
|
276
|
+
|
277
|
+
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
|
278
|
+
def reverse_merge!(other_hash); end
|
279
|
+
|
280
|
+
# with_defaults! is an alias of reverse_merge!
|
281
|
+
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
|
282
|
+
def with_defaults!(other_hash); end
|
283
|
+
|
284
|
+
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
|
285
|
+
def reverse_merge(other_hash); end
|
286
|
+
|
287
|
+
# with_defaults is an alias of reverse_merge
|
288
|
+
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
|
289
|
+
def with_defaults(other_hash); end
|
290
|
+
|
291
|
+
sig { params(block: T.untyped).returns(T.nilable(ActionController::Parameters)) }
|
292
|
+
def select!(&block); end
|
293
|
+
|
294
|
+
# keep_if is an alias of select!
|
295
|
+
sig { params(block: T.untyped).returns(T.nilable(ActionController::Parameters)) }
|
296
|
+
def keep_if(&block); end
|
297
|
+
|
298
|
+
sig { params(block: T.untyped).returns(ActionController::Parameters) }
|
299
|
+
def select(&block); end
|
300
|
+
|
301
|
+
sig { returns(T.any(Symbol, T::Boolean)) }
|
302
|
+
def self.action_on_unpermitted_parameters; end
|
303
|
+
|
304
|
+
sig { params(obj: T.any(Symbol, T::Boolean)).void }
|
305
|
+
def self.action_on_unpermitted_parameters=(obj); end
|
306
|
+
|
307
|
+
sig { returns(T::Array[T.any(String, Symbol)]) }
|
308
|
+
def self.always_permitted_parameters; end
|
309
|
+
|
310
|
+
sig { params(obj: T::Array[T.any(String, Symbol)]).void }
|
311
|
+
def self.always_permitted_parameters=(obj); end
|
312
|
+
|
313
|
+
sig { returns(T::Boolean) }
|
314
|
+
def self.permit_all_parameters; end
|
315
|
+
|
316
|
+
sig { params(obj: T::Boolean).void }
|
317
|
+
def self.permit_all_parameters=(obj); end
|
318
|
+
|
319
|
+
sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) }
|
320
|
+
def slice!(*keys); end
|
321
|
+
|
322
|
+
sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) }
|
323
|
+
def slice(*keys); end
|
324
|
+
|
325
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
326
|
+
def to_h; end
|
327
|
+
|
328
|
+
sig { returns(T::Hash[T.untyped, T.untyped]) }
|
329
|
+
def to_hash; end
|
330
|
+
|
331
|
+
# to_param is an alias of to_query
|
332
|
+
sig { params(args: String).returns(T.nilable(String)) }
|
333
|
+
def to_param(*args); end
|
334
|
+
|
335
|
+
sig { params(args: String).returns(T.nilable(String)) }
|
336
|
+
def to_query(*args); end
|
337
|
+
|
338
|
+
sig { returns(String) }
|
339
|
+
def to_s; end
|
340
|
+
|
341
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
342
|
+
def to_unsafe_h; end
|
343
|
+
|
344
|
+
# to_unsafe_hash is an alias of to_unsafe_h
|
345
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
346
|
+
def to_unsafe_hash; end
|
347
|
+
|
348
|
+
sig { params(block: T.untyped).returns(ActionController::Parameters) }
|
349
|
+
def transform_keys!(&block); end
|
350
|
+
|
351
|
+
sig { params(block: T.untyped).returns(ActionController::Parameters) }
|
352
|
+
def transform_keys(&block); end
|
353
|
+
|
354
|
+
sig { returns(ActionController::Parameters) }
|
355
|
+
def transform_values!; end
|
356
|
+
|
357
|
+
sig { returns(ActionController::Parameters) }
|
358
|
+
def transform_values; end
|
359
|
+
|
360
|
+
sig { params(value: T.untyped).returns(T::Boolean) }
|
361
|
+
def value?(value); end
|
362
|
+
|
363
|
+
sig { returns(T::Array[T.untyped]) }
|
364
|
+
def values; end
|
365
|
+
|
366
|
+
sig { params(keys: T.any(String, Symbol)).returns(T.untyped) }
|
367
|
+
def values_at(*keys); end
|
368
|
+
end
|
369
|
+
|
370
|
+
module ActionController::StrongParameters
|
371
|
+
sig { returns(ActionController::Parameters) }
|
372
|
+
def params; end
|
373
|
+
end
|
374
|
+
|
375
|
+
class ActionDispatch::Routing::RouteSet
|
376
|
+
sig { params(blk: T.proc.bind(ActionDispatch::Routing::Mapper).void).void }
|
377
|
+
def draw(&blk); end
|
378
|
+
end
|
379
|
+
|
380
|
+
module ActionController::Flash::ClassMethods
|
381
|
+
sig { params(types: Symbol).void }
|
382
|
+
def add_flash_types(*types); end
|
383
|
+
end
|
384
|
+
|
385
|
+
module ActionController::RequestForgeryProtection::ClassMethods
|
386
|
+
sig do
|
387
|
+
params(
|
388
|
+
only: T.any(T::Array[Symbol], Symbol),
|
389
|
+
except: T.nilable(T.any(T::Array[Symbol], Symbol)),
|
390
|
+
if: T.untyped,
|
391
|
+
unless: T.untyped,
|
392
|
+
prepend: T.untyped,
|
393
|
+
with: T.nilable(Symbol),
|
394
|
+
exception: T.untyped,
|
395
|
+
reset_session: T.untyped,
|
396
|
+
null_session: T.untyped
|
397
|
+
).void
|
398
|
+
end
|
399
|
+
def protect_from_forgery(
|
400
|
+
only: nil,
|
401
|
+
except: nil,
|
402
|
+
if: nil,
|
403
|
+
unless: nil,
|
404
|
+
prepend: false,
|
405
|
+
with: nil,
|
406
|
+
exception: nil,
|
407
|
+
reset_session: nil,
|
408
|
+
null_session: nil
|
409
|
+
); end
|
410
|
+
end
|
411
|
+
|
412
|
+
module ActionDispatch::Routing::Mapper::HttpHelpers
|
413
|
+
# get, put, patch, post, and delete all have the same arguments as
|
414
|
+
# ActionDispatch::Routing::Mapper::Resources#match
|
415
|
+
sig do
|
416
|
+
params(
|
417
|
+
name: T.any(String, Symbol, T::Hash[String, String]),
|
418
|
+
controller: T.nilable(T.any(String, Symbol)),
|
419
|
+
action: T.nilable(T.any(String, Symbol)),
|
420
|
+
param: T.nilable(Symbol),
|
421
|
+
module: T.nilable(T.any(String, Symbol)),
|
422
|
+
as: T.nilable(T.any(String, Symbol)),
|
423
|
+
via: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
424
|
+
to: T.nilable(T.any(String, T.proc.returns(T.untyped))),
|
425
|
+
on: T.nilable(Symbol),
|
426
|
+
constraints: T.untyped,
|
427
|
+
defaults: T.nilable(T::Hash[T.untyped, T.untyped]),
|
428
|
+
anchor: T::Boolean,
|
429
|
+
format: T.nilable(T.any(String, T::Boolean)),
|
430
|
+
path: T.nilable(T.any(String, Symbol)),
|
431
|
+
block: T.untyped
|
432
|
+
).returns(T.untyped)
|
433
|
+
end
|
434
|
+
def delete(
|
435
|
+
name,
|
436
|
+
controller: nil,
|
437
|
+
action: nil,
|
438
|
+
param: :id,
|
439
|
+
module: nil,
|
440
|
+
as: nil,
|
441
|
+
via: nil,
|
442
|
+
to: nil,
|
443
|
+
on: nil,
|
444
|
+
constraints: nil,
|
445
|
+
defaults: nil,
|
446
|
+
anchor: true,
|
447
|
+
format: nil,
|
448
|
+
path: nil,
|
449
|
+
&block
|
450
|
+
); end
|
451
|
+
|
452
|
+
sig do
|
453
|
+
params(
|
454
|
+
name: T.any(String, Symbol, T::Hash[String, String]),
|
455
|
+
controller: T.nilable(T.any(String, Symbol)),
|
456
|
+
action: T.nilable(T.any(String, Symbol)),
|
457
|
+
param: T.nilable(Symbol),
|
458
|
+
module: T.nilable(T.any(String, Symbol)),
|
459
|
+
as: T.nilable(T.any(String, Symbol)),
|
460
|
+
via: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
461
|
+
to: T.nilable(T.any(String, Symbol, T.proc.returns(T.untyped))),
|
462
|
+
on: T.nilable(Symbol),
|
463
|
+
constraints: T.untyped,
|
464
|
+
defaults: T.nilable(T::Hash[T.untyped, T.untyped]),
|
465
|
+
anchor: T::Boolean,
|
466
|
+
format: T.nilable(T.any(String, T::Boolean)),
|
467
|
+
path: T.nilable(T.any(String, Symbol)),
|
468
|
+
block: T.untyped
|
469
|
+
).returns(T.untyped)
|
470
|
+
end
|
471
|
+
def get(
|
472
|
+
name,
|
473
|
+
controller: nil,
|
474
|
+
action: nil,
|
475
|
+
param: :id,
|
476
|
+
module: nil,
|
477
|
+
as: nil,
|
478
|
+
via: nil,
|
479
|
+
to: nil,
|
480
|
+
on: nil,
|
481
|
+
constraints: nil,
|
482
|
+
defaults: nil,
|
483
|
+
anchor: true,
|
484
|
+
format: nil,
|
485
|
+
path: nil,
|
486
|
+
&block
|
487
|
+
); end
|
488
|
+
|
489
|
+
sig do
|
490
|
+
params(
|
491
|
+
name: T.any(String, Symbol, T::Hash[String, String]),
|
492
|
+
controller: T.nilable(T.any(String, Symbol)),
|
493
|
+
action: T.nilable(T.any(String, Symbol)),
|
494
|
+
param: T.nilable(Symbol),
|
495
|
+
module: T.nilable(T.any(String, Symbol)),
|
496
|
+
as: T.nilable(T.any(String, Symbol)),
|
497
|
+
via: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
498
|
+
to: T.nilable(T.any(String, T.proc.returns(T.untyped))),
|
499
|
+
on: T.nilable(Symbol),
|
500
|
+
constraints: T.untyped,
|
501
|
+
defaults: T.nilable(T::Hash[T.untyped, T.untyped]),
|
502
|
+
anchor: T::Boolean,
|
503
|
+
format: T.nilable(T.any(String, T::Boolean)),
|
504
|
+
path: T.nilable(T.any(String, Symbol)),
|
505
|
+
block: T.untyped
|
506
|
+
).returns(T.untyped)
|
507
|
+
end
|
508
|
+
def patch(
|
509
|
+
name,
|
510
|
+
controller: nil,
|
511
|
+
action: nil,
|
512
|
+
param: :id,
|
513
|
+
module: nil,
|
514
|
+
as: nil,
|
515
|
+
via: nil,
|
516
|
+
to: nil,
|
517
|
+
on: nil,
|
518
|
+
constraints: nil,
|
519
|
+
defaults: nil,
|
520
|
+
anchor: true,
|
521
|
+
format: nil,
|
522
|
+
path: nil,
|
523
|
+
&block
|
524
|
+
); end
|
525
|
+
|
526
|
+
sig do
|
527
|
+
params(
|
528
|
+
name: T.any(String, Symbol, T::Hash[String, String]),
|
529
|
+
controller: T.nilable(T.any(String, Symbol)),
|
530
|
+
action: T.nilable(T.any(String, Symbol)),
|
531
|
+
param: T.nilable(Symbol),
|
532
|
+
module: T.nilable(T.any(String, Symbol)),
|
533
|
+
as: T.nilable(T.any(String, Symbol)),
|
534
|
+
via: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
535
|
+
to: T.nilable(T.any(String, T.proc.returns(T.untyped))),
|
536
|
+
on: T.nilable(Symbol),
|
537
|
+
constraints: T.untyped,
|
538
|
+
defaults: T.nilable(T::Hash[T.untyped, T.untyped]),
|
539
|
+
anchor: T::Boolean,
|
540
|
+
format: T.nilable(T.any(String, T::Boolean)),
|
541
|
+
path: T.nilable(T.any(String, Symbol)),
|
542
|
+
block: T.untyped
|
543
|
+
).returns(T.untyped)
|
544
|
+
end
|
545
|
+
def post(
|
546
|
+
name,
|
547
|
+
controller: nil,
|
548
|
+
action: nil,
|
549
|
+
param: :id,
|
550
|
+
module: nil,
|
551
|
+
as: nil,
|
552
|
+
via: nil,
|
553
|
+
to: nil,
|
554
|
+
on: nil,
|
555
|
+
constraints: nil,
|
556
|
+
defaults: nil,
|
557
|
+
anchor: true,
|
558
|
+
format: nil,
|
559
|
+
path: nil,
|
560
|
+
&block
|
561
|
+
); end
|
562
|
+
|
563
|
+
sig do
|
564
|
+
params(
|
565
|
+
name: T.any(String, Symbol, T::Hash[String, String]),
|
566
|
+
controller: T.nilable(T.any(String, Symbol)),
|
567
|
+
action: T.nilable(T.any(String, Symbol)),
|
568
|
+
param: T.nilable(Symbol),
|
569
|
+
module: T.nilable(T.any(String, Symbol)),
|
570
|
+
as: T.nilable(T.any(String, Symbol)),
|
571
|
+
via: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
572
|
+
to: T.nilable(T.any(String, T.proc.returns(T.untyped))),
|
573
|
+
on: T.nilable(Symbol),
|
574
|
+
constraints: T.untyped,
|
575
|
+
defaults: T.nilable(T::Hash[T.untyped, T.untyped]),
|
576
|
+
anchor: T::Boolean,
|
577
|
+
format: T.nilable(T.any(String, T::Boolean)),
|
578
|
+
path: T.nilable(T.any(String, Symbol)),
|
579
|
+
block: T.untyped
|
580
|
+
).returns(T.untyped)
|
581
|
+
end
|
582
|
+
def put(
|
583
|
+
name,
|
584
|
+
controller: nil,
|
585
|
+
action: nil,
|
586
|
+
param: :id,
|
587
|
+
module: nil,
|
588
|
+
as: nil,
|
589
|
+
via: nil,
|
590
|
+
to: nil,
|
591
|
+
on: nil,
|
592
|
+
constraints: nil,
|
593
|
+
defaults: nil,
|
594
|
+
anchor: true,
|
595
|
+
format: nil,
|
596
|
+
path: nil,
|
597
|
+
&block
|
598
|
+
); end
|
599
|
+
end
|
600
|
+
|
601
|
+
module ActionDispatch::Routing::Mapper::Resources
|
602
|
+
sig { params(name: T.untyped).returns(T.untyped) }
|
603
|
+
def action_path(name); end
|
604
|
+
|
605
|
+
sig { params(block: T.untyped).returns(T.untyped) }
|
606
|
+
def collection(&block); end
|
607
|
+
|
608
|
+
sig do
|
609
|
+
params(
|
610
|
+
name: T.any(String, Symbol, T::Hash[String, String]),
|
611
|
+
controller: T.nilable(T.any(String, Symbol)),
|
612
|
+
action: T.nilable(T.any(String, Symbol)),
|
613
|
+
param: T.nilable(Symbol),
|
614
|
+
module: T.nilable(T.any(String, Symbol)),
|
615
|
+
as: T.nilable(T.any(String, Symbol)),
|
616
|
+
via: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
617
|
+
to: T.nilable(T.any(String, T.proc.returns(T.untyped))),
|
618
|
+
on: T.nilable(Symbol),
|
619
|
+
constraints: T.untyped,
|
620
|
+
defaults: T.nilable(T::Hash[T.untyped, T.untyped]),
|
621
|
+
anchor: T::Boolean,
|
622
|
+
format: T.nilable(T.any(String, T::Boolean)),
|
623
|
+
path: T.nilable(T.any(String, Symbol)),
|
624
|
+
block: T.untyped
|
625
|
+
).returns(T.untyped)
|
626
|
+
end
|
627
|
+
def match(
|
628
|
+
name,
|
629
|
+
controller: nil,
|
630
|
+
action: nil,
|
631
|
+
param: :id,
|
632
|
+
module: nil,
|
633
|
+
as: nil,
|
634
|
+
via: nil,
|
635
|
+
to: nil,
|
636
|
+
on: nil,
|
637
|
+
constraints: nil,
|
638
|
+
defaults: nil,
|
639
|
+
anchor: true,
|
640
|
+
format: nil,
|
641
|
+
path: nil,
|
642
|
+
&block
|
643
|
+
); end
|
644
|
+
|
645
|
+
sig { params(block: T.untyped).returns(T.untyped) }
|
646
|
+
def member(&block); end
|
647
|
+
|
648
|
+
# These are set to T.unsafe(nil) because they do actually have values, but they
|
649
|
+
# can't be determined statically. They take the value of path when no explicit
|
650
|
+
# values are provided.
|
651
|
+
sig do
|
652
|
+
params(
|
653
|
+
path: T.untyped,
|
654
|
+
as: T.untyped,
|
655
|
+
module: T.untyped,
|
656
|
+
shallow_path: T.untyped,
|
657
|
+
shallow_prefix: T.untyped,
|
658
|
+
block: T.untyped
|
659
|
+
).returns(T.untyped)
|
660
|
+
end
|
661
|
+
def namespace(
|
662
|
+
path,
|
663
|
+
as: T.unsafe(nil),
|
664
|
+
module: T.unsafe(nil),
|
665
|
+
shallow_path: T.unsafe(nil),
|
666
|
+
shallow_prefix: T.unsafe(nil),
|
667
|
+
&block
|
668
|
+
); end
|
669
|
+
|
670
|
+
sig do
|
671
|
+
params(
|
672
|
+
resources: T.any(String, Symbol),
|
673
|
+
as: T.nilable(T.any(String, Symbol)),
|
674
|
+
controller: T.nilable(T.any(String, Symbol)),
|
675
|
+
concerns: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
676
|
+
param: T.nilable(Symbol),
|
677
|
+
path_names: T.untyped,
|
678
|
+
path: T.untyped,
|
679
|
+
only: T.nilable(T.any(
|
680
|
+
T::Array[T.any(String, Symbol)],
|
681
|
+
String,
|
682
|
+
Symbol
|
683
|
+
)),
|
684
|
+
except: T.nilable(T.any(
|
685
|
+
T::Array[T.any(String, Symbol)],
|
686
|
+
String,
|
687
|
+
Symbol
|
688
|
+
)),
|
689
|
+
shallow: T::Boolean,
|
690
|
+
shallow_path: T.nilable(String),
|
691
|
+
shallow_prefix: T.nilable(String),
|
692
|
+
format: T.untyped,
|
693
|
+
block: T.untyped
|
694
|
+
).returns(T.untyped)
|
695
|
+
end
|
696
|
+
def resource(
|
697
|
+
*resources,
|
698
|
+
as: nil,
|
699
|
+
controller: nil,
|
700
|
+
concerns: nil,
|
701
|
+
param: nil,
|
702
|
+
path_names: nil,
|
703
|
+
path: nil,
|
704
|
+
only: nil,
|
705
|
+
except: nil,
|
706
|
+
shallow: false,
|
707
|
+
shallow_path: nil,
|
708
|
+
shallow_prefix: nil,
|
709
|
+
format: nil,
|
710
|
+
&block
|
711
|
+
); end
|
712
|
+
|
713
|
+
sig do
|
714
|
+
params(
|
715
|
+
resources: T.any(String, Symbol),
|
716
|
+
as: T.nilable(T.any(String, Symbol)),
|
717
|
+
controller: T.nilable(T.any(String, Symbol)),
|
718
|
+
concerns: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
719
|
+
param: T.nilable(Symbol),
|
720
|
+
path_names: T.untyped,
|
721
|
+
path: T.untyped,
|
722
|
+
only: T.nilable(T.any(
|
723
|
+
T::Array[T.any(String, Symbol)],
|
724
|
+
String,
|
725
|
+
Symbol
|
726
|
+
)),
|
727
|
+
except: T.nilable(T.any(
|
728
|
+
T::Array[T.any(String, Symbol)],
|
729
|
+
String,
|
730
|
+
Symbol
|
731
|
+
)),
|
732
|
+
shallow: T::Boolean,
|
733
|
+
shallow_path: T.nilable(String),
|
734
|
+
shallow_prefix: T.nilable(String),
|
735
|
+
format: T.untyped,
|
736
|
+
block: T.untyped
|
737
|
+
).returns(T.untyped)
|
738
|
+
end
|
739
|
+
def resources(
|
740
|
+
*resources,
|
741
|
+
as: nil,
|
742
|
+
controller: nil,
|
743
|
+
concerns: nil,
|
744
|
+
param: nil,
|
745
|
+
path_names: nil,
|
746
|
+
path: nil,
|
747
|
+
only: nil,
|
748
|
+
except: nil,
|
749
|
+
shallow: false,
|
750
|
+
shallow_path: nil,
|
751
|
+
shallow_prefix: nil,
|
752
|
+
format: nil,
|
753
|
+
&block
|
754
|
+
); end
|
755
|
+
|
756
|
+
# Technically, path doesn't have a default value set. However, this is
|
757
|
+
# necessary to allow code like `root to: 'home#index'`.
|
758
|
+
sig { params(path: T.nilable(String), to: T.untyped).returns(T.untyped) }
|
759
|
+
def root(path = T.unsafe(nil), to: nil); end
|
760
|
+
|
761
|
+
sig { returns(T.untyped) }
|
762
|
+
def shallow; end
|
763
|
+
|
764
|
+
sig { returns(T::Boolean) }
|
765
|
+
def shallow?; end
|
766
|
+
end
|
767
|
+
|
768
|
+
# https://api.rubyonrails.org/classes/AbstractController/Callbacks/ClassMethods.html
|
769
|
+
module AbstractController::Callbacks::ClassMethods
|
770
|
+
sig do
|
771
|
+
params(
|
772
|
+
names: Symbol,
|
773
|
+
except: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
774
|
+
only: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
775
|
+
if: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
776
|
+
unless: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
777
|
+
block: T.nilable(T.proc.returns(T.untyped))
|
778
|
+
).void
|
779
|
+
end
|
780
|
+
def after_action(*names, except: nil, only: nil, if: nil, unless: nil, &block); end
|
781
|
+
|
782
|
+
# append_after_action is an alias of after_action
|
783
|
+
sig do
|
784
|
+
params(
|
785
|
+
names: Symbol,
|
786
|
+
except: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
787
|
+
only: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
788
|
+
if: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
789
|
+
unless: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
790
|
+
block: T.nilable(T.proc.returns(T.untyped))
|
791
|
+
).void
|
792
|
+
end
|
793
|
+
def append_after_action(*names, except: nil, only: nil, if: nil, unless: nil, &block); end
|
794
|
+
|
795
|
+
# append_around_action is an alias of around_action
|
796
|
+
sig do
|
797
|
+
params(
|
798
|
+
names: Symbol,
|
799
|
+
except: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
800
|
+
only: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
801
|
+
if: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
802
|
+
unless: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
803
|
+
block: T.nilable(T.proc.returns(T.untyped))
|
804
|
+
).void
|
805
|
+
end
|
806
|
+
def append_around_action(*names, except: nil, only: nil, if: nil, unless: nil, &block); end
|
807
|
+
|
808
|
+
# append_before_action is an alias of before_action
|
809
|
+
sig do
|
810
|
+
params(
|
811
|
+
names: Symbol,
|
812
|
+
except: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
813
|
+
only: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
814
|
+
if: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
815
|
+
unless: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
816
|
+
block: T.nilable(T.proc.returns(T.untyped))
|
817
|
+
).void
|
818
|
+
end
|
819
|
+
def append_before_action(*names, except: nil, only: nil, if: nil, unless: nil, &block); end
|
820
|
+
|
821
|
+
sig do
|
822
|
+
params(
|
823
|
+
names: Symbol,
|
824
|
+
except: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
825
|
+
only: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
826
|
+
if: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
827
|
+
unless: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
828
|
+
block: T.nilable(T.proc.returns(T.untyped))
|
829
|
+
).void
|
830
|
+
end
|
831
|
+
def around_action(*names, except: nil, only: nil, if: nil, unless: nil, &block); end
|
832
|
+
|
833
|
+
sig do
|
834
|
+
params(
|
835
|
+
names: Symbol,
|
836
|
+
except: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
837
|
+
only: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
838
|
+
if: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
839
|
+
unless: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
840
|
+
block: T.nilable(T.proc.returns(T.untyped))
|
841
|
+
).void
|
842
|
+
end
|
843
|
+
def before_action(*names, except: nil, only: nil, if: nil, unless: nil, &block); end
|
844
|
+
|
845
|
+
sig do
|
846
|
+
params(
|
847
|
+
names: Symbol,
|
848
|
+
except: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
849
|
+
only: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
850
|
+
if: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
851
|
+
unless: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
852
|
+
block: T.nilable(T.proc.returns(T.untyped))
|
853
|
+
).void
|
854
|
+
end
|
855
|
+
def prepend_after_action(*names, except: nil, only: nil, if: nil, unless: nil, &block); end
|
856
|
+
|
857
|
+
sig do
|
858
|
+
params(
|
859
|
+
names: Symbol,
|
860
|
+
except: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
861
|
+
only: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
862
|
+
if: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
863
|
+
unless: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
864
|
+
block: T.nilable(T.proc.returns(T.untyped))
|
865
|
+
).void
|
866
|
+
end
|
867
|
+
def prepend_around_action(*names, except: nil, only: nil, if: nil, unless: nil, &block); end
|
868
|
+
|
869
|
+
sig do
|
870
|
+
params(
|
871
|
+
names: Symbol,
|
872
|
+
except: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
873
|
+
only: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
874
|
+
if: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
875
|
+
unless: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
876
|
+
block: T.nilable(T.proc.returns(T.untyped))
|
877
|
+
).void
|
878
|
+
end
|
879
|
+
def prepend_before_action(*names, except: nil, only: nil, if: nil, unless: nil, &block); end
|
880
|
+
|
881
|
+
sig do
|
882
|
+
params(
|
883
|
+
names: Symbol,
|
884
|
+
except: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
885
|
+
only: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
886
|
+
if: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
887
|
+
unless: T.nilable(T.any(Symbol, T::Array[Symbol], Proc))
|
888
|
+
).void
|
889
|
+
end
|
890
|
+
def skip_after_action(*names, except: nil, only: nil, if: nil, unless: nil); end
|
891
|
+
|
892
|
+
sig do
|
893
|
+
params(
|
894
|
+
names: Symbol,
|
895
|
+
except: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
896
|
+
only: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
897
|
+
if: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
898
|
+
unless: T.nilable(T.any(Symbol, T::Array[Symbol], Proc))
|
899
|
+
).void
|
900
|
+
end
|
901
|
+
def skip_around_action(*names, except: nil, only: nil, if: nil, unless: nil); end
|
902
|
+
|
903
|
+
sig do
|
904
|
+
params(
|
905
|
+
names: Symbol,
|
906
|
+
except: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
907
|
+
only: T.nilable(T.any(Symbol, T::Array[Symbol])),
|
908
|
+
if: T.nilable(T.any(Symbol, T::Array[Symbol], Proc)),
|
909
|
+
unless: T.nilable(T.any(Symbol, T::Array[Symbol], Proc))
|
910
|
+
).void
|
911
|
+
end
|
912
|
+
def skip_before_action(*names, except: nil, only: nil, if: nil, unless: nil); end
|
913
|
+
end
|
914
|
+
|
915
|
+
# https://api.rubyonrails.org/classes/ActionController/MimeResponds.html
|
916
|
+
module ActionController::MimeResponds
|
917
|
+
sig do
|
918
|
+
params(
|
919
|
+
mimes: T.nilable(Symbol),
|
920
|
+
block: T.nilable(T.proc.params(arg0: ActionController::MimeResponds::Collector).void)
|
921
|
+
).void
|
922
|
+
end
|
923
|
+
def respond_to(*mimes, &block); end
|
924
|
+
end
|
925
|
+
|
926
|
+
class ActionController::MimeResponds::Collector
|
927
|
+
sig { params(block: T.nilable(T.proc.void)).void }
|
928
|
+
def html(&block); end
|
929
|
+
|
930
|
+
sig { params(block: T.nilable(T.proc.void)).void }
|
931
|
+
def js(&block); end
|
932
|
+
|
933
|
+
sig { params(block: T.nilable(T.proc.void)).void }
|
934
|
+
def json(&block); end
|
935
|
+
|
936
|
+
sig { params(block: T.nilable(T.proc.void)).void }
|
937
|
+
def xml(&block); end
|
938
|
+
end
|