primitive 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +7 -0
  2. data/.bundle/config +2 -0
  3. data/.editorconfig +8 -0
  4. data/.github/workflows/ci.yaml +29 -0
  5. data/.gitignore +7 -0
  6. data/.rubocop.yml +16 -0
  7. data/.tool-versions +1 -0
  8. data/CHANGELOG.md +7 -0
  9. data/CODE_OF_CONDUCT.md +73 -0
  10. data/Gemfile +5 -0
  11. data/Guardfile +17 -0
  12. data/LICENSE +5 -0
  13. data/README.md +107 -0
  14. data/Rakefile +12 -0
  15. data/bin/_guard-core +27 -0
  16. data/bin/bundle +109 -0
  17. data/bin/bundle-audit +27 -0
  18. data/bin/bundler-audit +27 -0
  19. data/bin/coderay +27 -0
  20. data/bin/guard +27 -0
  21. data/bin/htmldiff +27 -0
  22. data/bin/ldiff +27 -0
  23. data/bin/listen +27 -0
  24. data/bin/pry +27 -0
  25. data/bin/racc +27 -0
  26. data/bin/rake +27 -0
  27. data/bin/rspec +27 -0
  28. data/bin/rubocop +27 -0
  29. data/bin/ruby-parse +27 -0
  30. data/bin/ruby-rewrite +27 -0
  31. data/bin/spoom +27 -0
  32. data/bin/srb +27 -0
  33. data/bin/srb-rbi +27 -0
  34. data/bin/tapioca +27 -0
  35. data/bin/thor +27 -0
  36. data/bin/yard +27 -0
  37. data/bin/yardoc +27 -0
  38. data/bin/yri +27 -0
  39. data/lib/primitive/entity.rb +50 -0
  40. data/lib/primitive/version.rb +6 -0
  41. data/lib/primitive.rb +6 -0
  42. data/primitive.gemspec +45 -0
  43. data/sorbet/config +4 -0
  44. data/sorbet/rbi/annotations/.gitattributes +1 -0
  45. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  46. data/sorbet/rbi/gems/.gitattributes +1 -0
  47. data/sorbet/rbi/gems/ansi@1.5.0.rbi +8 -0
  48. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  49. data/sorbet/rbi/gems/bundler-audit@0.9.1.rbi +8 -0
  50. data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
  51. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +8 -0
  52. data/sorbet/rbi/gems/docile@1.4.0.rbi +8 -0
  53. data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
  54. data/sorbet/rbi/gems/ffi@1.16.3.rbi +8 -0
  55. data/sorbet/rbi/gems/formatador@1.1.0.rbi +8 -0
  56. data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +66 -0
  57. data/sorbet/rbi/gems/guard-rspec@4.7.3.rbi +562 -0
  58. data/sorbet/rbi/gems/guard@2.18.1.rbi +8 -0
  59. data/sorbet/rbi/gems/json@2.7.1.rbi +1561 -0
  60. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +8 -0
  61. data/sorbet/rbi/gems/listen@3.8.0.rbi +8 -0
  62. data/sorbet/rbi/gems/lumberjack@1.2.9.rbi +8 -0
  63. data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
  64. data/sorbet/rbi/gems/nenv@0.3.0.rbi +8 -0
  65. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  66. data/sorbet/rbi/gems/notiffany@0.1.3.rbi +8 -0
  67. data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
  68. data/sorbet/rbi/gems/parser@3.3.0.5.rbi +5472 -0
  69. data/sorbet/rbi/gems/prism@0.27.0.rbi +35611 -0
  70. data/sorbet/rbi/gems/pry@0.14.2.rbi +8 -0
  71. data/sorbet/rbi/gems/racc@1.7.3.rbi +161 -0
  72. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +8 -0
  73. data/sorbet/rbi/gems/rake@13.1.0.rbi +3027 -0
  74. data/sorbet/rbi/gems/rb-fsevent@0.11.2.rbi +8 -0
  75. data/sorbet/rbi/gems/rb-inotify@0.10.1.rbi +8 -0
  76. data/sorbet/rbi/gems/rbi@0.1.12.rbi +3071 -0
  77. data/sorbet/rbi/gems/regexp_parser@2.9.0.rbi +8 -0
  78. data/sorbet/rbi/gems/rexml@3.2.6.rbi +8 -0
  79. data/sorbet/rbi/gems/rspec-core@3.12.2.rbi +8 -0
  80. data/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi +8 -0
  81. data/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi +8 -0
  82. data/sorbet/rbi/gems/rspec-support@3.12.1.rbi +8 -0
  83. data/sorbet/rbi/gems/rspec@3.12.0.rbi +8 -0
  84. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +8 -0
  85. data/sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi +8 -0
  86. data/sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi +8 -0
  87. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +8 -0
  88. data/sorbet/rbi/gems/rubocop-rspec@2.24.1.rbi +8 -0
  89. data/sorbet/rbi/gems/rubocop@1.60.2.rbi +8 -0
  90. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +8 -0
  91. data/sorbet/rbi/gems/shellany@0.0.1.rbi +8 -0
  92. data/sorbet/rbi/gems/simplecov-console@0.9.1.rbi +102 -0
  93. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +8 -0
  94. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2148 -0
  95. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
  96. data/sorbet/rbi/gems/spoom@1.3.2.rbi +4420 -0
  97. data/sorbet/rbi/gems/tapioca@0.13.3.rbi +3520 -0
  98. data/sorbet/rbi/gems/terminal-table@3.0.2.rbi +8 -0
  99. data/sorbet/rbi/gems/thor@1.3.1.rbi +4318 -0
  100. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +8 -0
  101. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  102. data/sorbet/rbi/gems/yard@0.9.36.rbi +18085 -0
  103. data/sorbet/tapioca/config.yml +13 -0
  104. data/sorbet/tapioca/require.rb +4 -0
  105. metadata +363 -0
@@ -0,0 +1,4318 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `thor` gem.
5
+ # Please instead update this file by running `bin/tapioca gem thor`.
6
+
7
+ # source://thor//lib/thor/shell/lcs_diff.rb#1
8
+ module LCSDiff
9
+ protected
10
+
11
+ # Overwrite show_diff to show diff with colors if Diff::LCS is
12
+ # available.
13
+ #
14
+ # source://thor//lib/thor/shell/lcs_diff.rb#6
15
+ def show_diff(destination, content); end
16
+
17
+ private
18
+
19
+ # Check if Diff::LCS is loaded. If it is, use it to create pretty output
20
+ # for diff.
21
+ #
22
+ # @return [Boolean]
23
+ #
24
+ # source://thor//lib/thor/shell/lcs_diff.rb#37
25
+ def diff_lcs_loaded?; end
26
+
27
+ # source://thor//lib/thor/shell/lcs_diff.rb#21
28
+ def output_diff_line(diff); end
29
+ end
30
+
31
+ # source://thor//lib/thor/command.rb#1
32
+ class Thor
33
+ include ::Thor::Base
34
+ include ::Thor::Invocation
35
+ include ::Thor::Shell
36
+ extend ::Thor::Base::ClassMethods
37
+ extend ::Thor::Invocation::ClassMethods
38
+
39
+ # source://thor//lib/thor.rb#652
40
+ def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
41
+
42
+ class << self
43
+ # Adds and declares option group for required at least one of options in the
44
+ # block of arguments. You can declare options as the outside of the block.
45
+ #
46
+ # If :for is given as option, it allows you to change the options from
47
+ # a previous defined command.
48
+ #
49
+ # ==== Parameters
50
+ # Array[Thor::Option.name]
51
+ # options<Hash>:: :for is applied for previous defined command.
52
+ #
53
+ # ==== Examples
54
+ #
55
+ # at_least_one do
56
+ # option :one
57
+ # option :two
58
+ # end
59
+ #
60
+ # Or
61
+ #
62
+ # option :one
63
+ # option :two
64
+ # at_least_one :one, :two
65
+ #
66
+ # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError
67
+ # will be raised.
68
+ #
69
+ # You can use at_least_one and exclusive at the same time.
70
+ #
71
+ # exclusive do
72
+ # at_least_one do
73
+ # option :one
74
+ # option :two
75
+ # end
76
+ # end
77
+ #
78
+ # Then it is required either only one of "--one" or "--two".
79
+ #
80
+ # source://thor//lib/thor.rb#246
81
+ def at_least_one(*args, &block); end
82
+
83
+ # Extend check unknown options to accept a hash of conditions.
84
+ #
85
+ # === Parameters
86
+ # options<Hash>: A hash containing :only and/or :except keys
87
+ #
88
+ # source://thor//lib/thor.rb#350
89
+ def check_unknown_options!(options = T.unsafe(nil)); end
90
+
91
+ # Overwrite check_unknown_options? to take subcommands and options into account.
92
+ #
93
+ # @return [Boolean]
94
+ #
95
+ # source://thor//lib/thor.rb#363
96
+ def check_unknown_options?(config); end
97
+
98
+ # Prints help information for the given command.
99
+ #
100
+ # ==== Parameters
101
+ # shell<Thor::Shell>
102
+ # command_name<String>
103
+ #
104
+ # source://thor//lib/thor.rb#258
105
+ def command_help(shell, command_name); end
106
+
107
+ # Sets the default command when thor is executed without an explicit command to be called.
108
+ #
109
+ # ==== Parameters
110
+ # meth<Symbol>:: name of the default command
111
+ #
112
+ # source://thor//lib/thor.rb#21
113
+ def default_command(meth = T.unsafe(nil)); end
114
+
115
+ # Sets the default command when thor is executed without an explicit command to be called.
116
+ #
117
+ # ==== Parameters
118
+ # meth<Symbol>:: name of the default command
119
+ #
120
+ # source://thor//lib/thor.rb#21
121
+ def default_task(meth = T.unsafe(nil)); end
122
+
123
+ # source://thor//lib/thor/base.rb#26
124
+ def deprecation_warning(message); end
125
+
126
+ # Defines the usage and the description of the next command.
127
+ #
128
+ # ==== Parameters
129
+ # usage<String>
130
+ # description<String>
131
+ # options<String>
132
+ #
133
+ # source://thor//lib/thor.rb#54
134
+ def desc(usage, description, options = T.unsafe(nil)); end
135
+
136
+ # Disable the check for required options for the given commands.
137
+ # This is useful if you have a command that does not need the required options
138
+ # to work, like help.
139
+ #
140
+ # ==== Parameters
141
+ # Symbol ...:: A list of commands that should be affected.
142
+ #
143
+ # source://thor//lib/thor.rb#434
144
+ def disable_required_check!(*command_names); end
145
+
146
+ # @return [Boolean]
147
+ #
148
+ # source://thor//lib/thor.rb#438
149
+ def disable_required_check?(command); end
150
+
151
+ # Adds and declares option group for exclusive options in the
152
+ # block and arguments. You can declare options as the outside of the block.
153
+ #
154
+ # If :for is given as option, it allows you to change the options from
155
+ # a previous defined command.
156
+ #
157
+ # ==== Parameters
158
+ # Array[Thor::Option.name]
159
+ # options<Hash>:: :for is applied for previous defined command.
160
+ #
161
+ # ==== Examples
162
+ #
163
+ # exclusive do
164
+ # option :one
165
+ # option :two
166
+ # end
167
+ #
168
+ # Or
169
+ #
170
+ # option :one
171
+ # option :two
172
+ # exclusive :one, :two
173
+ #
174
+ # If you give "--one" and "--two" at the same time ExclusiveArgumentsError
175
+ # will be raised.
176
+ #
177
+ # source://thor//lib/thor.rb#203
178
+ def exclusive(*args, &block); end
179
+
180
+ # Prints help information for this class.
181
+ #
182
+ # ==== Parameters
183
+ # shell<Thor::Shell>
184
+ #
185
+ # source://thor//lib/thor.rb#288
186
+ def help(shell, subcommand = T.unsafe(nil)); end
187
+
188
+ # Defines the long description of the next command.
189
+ #
190
+ # Long description is by default indented, line-wrapped and repeated whitespace merged.
191
+ # In order to print long description verbatim, with indentation and spacing exactly
192
+ # as found in the code, use the +wrap+ option
193
+ #
194
+ # long_desc 'your very long description', wrap: false
195
+ #
196
+ # ==== Parameters
197
+ # long description<String>
198
+ # options<Hash>
199
+ #
200
+ # source://thor//lib/thor.rb#78
201
+ def long_desc(long_description, options = T.unsafe(nil)); end
202
+
203
+ # Maps an input to a command. If you define:
204
+ #
205
+ # map "-T" => "list"
206
+ #
207
+ # Running:
208
+ #
209
+ # thor -T
210
+ #
211
+ # Will invoke the list command.
212
+ #
213
+ # ==== Parameters
214
+ # Hash[String|Array => Symbol]:: Maps the string or the strings in the array to the given command.
215
+ #
216
+ # source://thor//lib/thor.rb#101
217
+ def map(mappings = T.unsafe(nil), **kw); end
218
+
219
+ # Adds and declares option group for required at least one of options in the
220
+ # block of arguments. You can declare options as the outside of the block.
221
+ #
222
+ # If :for is given as option, it allows you to change the options from
223
+ # a previous defined command.
224
+ #
225
+ # ==== Parameters
226
+ # Array[Thor::Option.name]
227
+ # options<Hash>:: :for is applied for previous defined command.
228
+ #
229
+ # ==== Examples
230
+ #
231
+ # at_least_one do
232
+ # option :one
233
+ # option :two
234
+ # end
235
+ #
236
+ # Or
237
+ #
238
+ # option :one
239
+ # option :two
240
+ # at_least_one :one, :two
241
+ #
242
+ # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError
243
+ # will be raised.
244
+ #
245
+ # You can use at_least_one and exclusive at the same time.
246
+ #
247
+ # exclusive do
248
+ # at_least_one do
249
+ # option :one
250
+ # option :two
251
+ # end
252
+ # end
253
+ #
254
+ # Then it is required either only one of "--one" or "--two".
255
+ #
256
+ # source://thor//lib/thor.rb#246
257
+ def method_at_least_one(*args, &block); end
258
+
259
+ # Adds and declares option group for exclusive options in the
260
+ # block and arguments. You can declare options as the outside of the block.
261
+ #
262
+ # If :for is given as option, it allows you to change the options from
263
+ # a previous defined command.
264
+ #
265
+ # ==== Parameters
266
+ # Array[Thor::Option.name]
267
+ # options<Hash>:: :for is applied for previous defined command.
268
+ #
269
+ # ==== Examples
270
+ #
271
+ # exclusive do
272
+ # option :one
273
+ # option :two
274
+ # end
275
+ #
276
+ # Or
277
+ #
278
+ # option :one
279
+ # option :two
280
+ # exclusive :one, :two
281
+ #
282
+ # If you give "--one" and "--two" at the same time ExclusiveArgumentsError
283
+ # will be raised.
284
+ #
285
+ # source://thor//lib/thor.rb#203
286
+ def method_exclusive(*args, &block); end
287
+
288
+ # Adds an option to the set of method options. If :for is given as option,
289
+ # it allows you to change the options from a previous defined command.
290
+ #
291
+ # def previous_command
292
+ # # magic
293
+ # end
294
+ #
295
+ # method_option :foo, :for => :previous_command
296
+ #
297
+ # def next_command
298
+ # # magic
299
+ # end
300
+ #
301
+ # ==== Parameters
302
+ # name<Symbol>:: The name of the argument.
303
+ # options<Hash>:: Described below.
304
+ #
305
+ # ==== Options
306
+ # :desc - Description for the argument.
307
+ # :required - If the argument is required or not.
308
+ # :default - Default value for this argument. It cannot be required and have default values.
309
+ # :aliases - Aliases for this option.
310
+ # :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean.
311
+ # :banner - String to show on usage notes.
312
+ # :hide - If you want to hide this option from the help.
313
+ #
314
+ # source://thor//lib/thor.rb#163
315
+ def method_option(name, options = T.unsafe(nil)); end
316
+
317
+ # Declares the options for the next command to be declared.
318
+ #
319
+ # ==== Parameters
320
+ # Hash[Symbol => Object]:: The hash key is the name of the option and the value
321
+ # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric
322
+ # or :required (string). If you give a value, the type of the value is used.
323
+ #
324
+ # source://thor//lib/thor.rb#129
325
+ def method_options(options = T.unsafe(nil)); end
326
+
327
+ # Adds an option to the set of method options. If :for is given as option,
328
+ # it allows you to change the options from a previous defined command.
329
+ #
330
+ # def previous_command
331
+ # # magic
332
+ # end
333
+ #
334
+ # method_option :foo, :for => :previous_command
335
+ #
336
+ # def next_command
337
+ # # magic
338
+ # end
339
+ #
340
+ # ==== Parameters
341
+ # name<Symbol>:: The name of the argument.
342
+ # options<Hash>:: Described below.
343
+ #
344
+ # ==== Options
345
+ # :desc - Description for the argument.
346
+ # :required - If the argument is required or not.
347
+ # :default - Default value for this argument. It cannot be required and have default values.
348
+ # :aliases - Aliases for this option.
349
+ # :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean.
350
+ # :banner - String to show on usage notes.
351
+ # :hide - If you want to hide this option from the help.
352
+ #
353
+ # source://thor//lib/thor.rb#163
354
+ def option(name, options = T.unsafe(nil)); end
355
+
356
+ # Declares the options for the next command to be declared.
357
+ #
358
+ # ==== Parameters
359
+ # Hash[Symbol => Object]:: The hash key is the name of the option and the value
360
+ # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric
361
+ # or :required (string). If you give a value, the type of the value is used.
362
+ #
363
+ # source://thor//lib/thor.rb#129
364
+ def options(options = T.unsafe(nil)); end
365
+
366
+ # Allows for custom "Command" package naming.
367
+ #
368
+ # === Parameters
369
+ # name<String>
370
+ # options<Hash>
371
+ #
372
+ # source://thor//lib/thor.rb#12
373
+ def package_name(name, _ = T.unsafe(nil)); end
374
+
375
+ # Returns commands ready to be printed.
376
+ #
377
+ # source://thor//lib/thor.rb#309
378
+ def printable_commands(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end
379
+
380
+ # Returns commands ready to be printed.
381
+ #
382
+ # source://thor//lib/thor.rb#309
383
+ def printable_tasks(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end
384
+
385
+ # Registers another Thor subclass as a command.
386
+ #
387
+ # ==== Parameters
388
+ # klass<Class>:: Thor subclass to register
389
+ # command<String>:: Subcommand name to use
390
+ # usage<String>:: Short usage for the subcommand
391
+ # description<String>:: Description for the subcommand
392
+ #
393
+ # source://thor//lib/thor.rb#37
394
+ def register(klass, subcommand_name, usage, description, options = T.unsafe(nil)); end
395
+
396
+ # Stop parsing of options as soon as an unknown option or a regular
397
+ # argument is encountered. All remaining arguments are passed to the command.
398
+ # This is useful if you have a command that can receive arbitrary additional
399
+ # options, and where those additional options should not be handled by
400
+ # Thor.
401
+ #
402
+ # ==== Example
403
+ #
404
+ # To better understand how this is useful, let's consider a command that calls
405
+ # an external command. A user may want to pass arbitrary options and
406
+ # arguments to that command. The command itself also accepts some options,
407
+ # which should be handled by Thor.
408
+ #
409
+ # class_option "verbose", :type => :boolean
410
+ # stop_on_unknown_option! :exec
411
+ # check_unknown_options! :except => :exec
412
+ #
413
+ # desc "exec", "Run a shell command"
414
+ # def exec(*args)
415
+ # puts "diagnostic output" if options[:verbose]
416
+ # Kernel.exec(*args)
417
+ # end
418
+ #
419
+ # Here +exec+ can be called with +--verbose+ to get diagnostic output,
420
+ # e.g.:
421
+ #
422
+ # $ thor exec --verbose echo foo
423
+ # diagnostic output
424
+ # foo
425
+ #
426
+ # But if +--verbose+ is given after +echo+, it is passed to +echo+ instead:
427
+ #
428
+ # $ thor exec echo --verbose foo
429
+ # --verbose foo
430
+ #
431
+ # ==== Parameters
432
+ # Symbol ...:: A list of commands that should be affected.
433
+ #
434
+ # source://thor//lib/thor.rb#420
435
+ def stop_on_unknown_option!(*command_names); end
436
+
437
+ # @return [Boolean]
438
+ #
439
+ # source://thor//lib/thor.rb#424
440
+ def stop_on_unknown_option?(command); end
441
+
442
+ # source://thor//lib/thor.rb#329
443
+ def subcommand(subcommand, subcommand_class); end
444
+
445
+ # source://thor//lib/thor.rb#325
446
+ def subcommand_classes; end
447
+
448
+ # source://thor//lib/thor.rb#320
449
+ def subcommands; end
450
+
451
+ # source://thor//lib/thor.rb#329
452
+ def subtask(subcommand, subcommand_class); end
453
+
454
+ # source://thor//lib/thor.rb#320
455
+ def subtasks; end
456
+
457
+ # Prints help information for the given command.
458
+ #
459
+ # ==== Parameters
460
+ # shell<Thor::Shell>
461
+ # command_name<String>
462
+ #
463
+ # source://thor//lib/thor.rb#258
464
+ def task_help(shell, command_name); end
465
+
466
+ protected
467
+
468
+ # The banner for this class. You can customize it if you are invoking the
469
+ # thor class by another ways which is not the Thor::Runner. It receives
470
+ # the command that is going to be invoked and a boolean which indicates if
471
+ # the namespace should be displayed as arguments.
472
+ #
473
+ # source://thor//lib/thor.rb#535
474
+ def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end
475
+
476
+ # source://thor//lib/thor.rb#541
477
+ def baseclass; end
478
+
479
+ # source://thor//lib/thor.rb#549
480
+ def create_command(meth); end
481
+
482
+ # source://thor//lib/thor.rb#549
483
+ def create_task(meth); end
484
+
485
+ # help command has the required check disabled by default.
486
+ #
487
+ # source://thor//lib/thor.rb#467
488
+ def disable_required_check; end
489
+
490
+ # The method responsible for dispatching given the args.
491
+ #
492
+ # @yield [instance]
493
+ #
494
+ # source://thor//lib/thor.rb#494
495
+ def dispatch(meth, given_args, given_opts, config); end
496
+
497
+ # source://thor//lib/thor.rb#545
498
+ def dynamic_command_class; end
499
+
500
+ # this is the logic that takes the command name passed in by the user
501
+ # and determines whether it is an unambiguous substrings of a command or
502
+ # alias name.
503
+ #
504
+ # source://thor//lib/thor.rb#615
505
+ def find_command_possibilities(meth); end
506
+
507
+ # this is the logic that takes the command name passed in by the user
508
+ # and determines whether it is an unambiguous substrings of a command or
509
+ # alias name.
510
+ #
511
+ # source://thor//lib/thor.rb#615
512
+ def find_task_possibilities(meth); end
513
+
514
+ # source://thor//lib/thor.rb#575
515
+ def initialize_added; end
516
+
517
+ # Returns this class at least one of required options array set.
518
+ #
519
+ # ==== Returns
520
+ # Array[Array[Thor::Option.name]]
521
+ #
522
+ # source://thor//lib/thor.rb#458
523
+ def method_at_least_one_option_names; end
524
+
525
+ # Returns this class exclusive options array set.
526
+ #
527
+ # ==== Returns
528
+ # Array[Array[Thor::Option.name]]
529
+ #
530
+ # source://thor//lib/thor.rb#449
531
+ def method_exclusive_option_names; end
532
+
533
+ # receives a (possibly nil) command name and returns a name that is in
534
+ # the commands hash. In addition to normalizing aliases, this logic
535
+ # will determine if a shortened command is an unambiguous substring of
536
+ # a command or alias.
537
+ #
538
+ # +normalize_command_name+ also converts names like +animal-prison+
539
+ # into +animal_prison+.
540
+ #
541
+ # @raise [AmbiguousTaskError]
542
+ #
543
+ # source://thor//lib/thor.rb#594
544
+ def normalize_command_name(meth); end
545
+
546
+ # receives a (possibly nil) command name and returns a name that is in
547
+ # the commands hash. In addition to normalizing aliases, this logic
548
+ # will determine if a shortened command is an unambiguous substring of
549
+ # a command or alias.
550
+ #
551
+ # +normalize_command_name+ also converts names like +animal-prison+
552
+ # into +animal_prison+.
553
+ #
554
+ # @raise [AmbiguousTaskError]
555
+ #
556
+ # source://thor//lib/thor.rb#594
557
+ def normalize_task_name(meth); end
558
+
559
+ # source://thor//lib/thor.rb#482
560
+ def print_at_least_one_required_options(shell, command = T.unsafe(nil)); end
561
+
562
+ # source://thor//lib/thor.rb#471
563
+ def print_exclusive_options(shell, command = T.unsafe(nil)); end
564
+
565
+ # Retrieve the command name from given args.
566
+ #
567
+ # source://thor//lib/thor.rb#581
568
+ def retrieve_command_name(args); end
569
+
570
+ # Retrieve the command name from given args.
571
+ #
572
+ # source://thor//lib/thor.rb#581
573
+ def retrieve_task_name(args); end
574
+
575
+ # Sort the commands, lexicographically by default.
576
+ #
577
+ # Can be overridden in the subclass to change the display order of the
578
+ # commands.
579
+ #
580
+ # source://thor//lib/thor.rb#642
581
+ def sort_commands!(list); end
582
+
583
+ # source://thor//lib/thor.rb#462
584
+ def stop_on_unknown_option; end
585
+
586
+ # source://thor//lib/thor.rb#630
587
+ def subcommand_help(cmd); end
588
+
589
+ # source://thor//lib/thor.rb#630
590
+ def subtask_help(cmd); end
591
+ end
592
+ end
593
+
594
+ # source://thor//lib/thor/actions/empty_directory.rb#2
595
+ module Thor::Actions
596
+ mixes_in_class_methods ::Thor::Actions::ClassMethods
597
+
598
+ # Extends initializer to add more configuration options.
599
+ #
600
+ # ==== Configuration
601
+ # behavior<Symbol>:: The actions default behavior. Can be :invoke or :revoke.
602
+ # It also accepts :force, :skip and :pretend to set the behavior
603
+ # and the respective option.
604
+ #
605
+ # destination_root<String>:: The root directory needed for some actions.
606
+ #
607
+ # source://thor//lib/thor/actions.rb#72
608
+ def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end
609
+
610
+ # Wraps an action object and call it accordingly to the thor class behavior.
611
+ #
612
+ # source://thor//lib/thor/actions.rb#89
613
+ def action(instance); end
614
+
615
+ # Create a new file relative to the destination root with the given data,
616
+ # which is the return value of a block or a data string.
617
+ #
618
+ # ==== Parameters
619
+ # destination<String>:: the relative path to the destination root.
620
+ # data<String|NilClass>:: the data to append to the file.
621
+ # config<Hash>:: give :verbose => false to not log the status.
622
+ #
623
+ # ==== Examples
624
+ #
625
+ # create_file "lib/fun_party.rb" do
626
+ # hostname = ask("What is the virtual hostname I should use?")
627
+ # "vhost.name = #{hostname}"
628
+ # end
629
+ #
630
+ # create_file "config/apache.conf", "your apache config"
631
+ #
632
+ # source://thor//lib/thor/actions/create_file.rb#22
633
+ def add_file(destination, *args, &block); end
634
+
635
+ # Create a new file relative to the destination root from the given source.
636
+ #
637
+ # ==== Parameters
638
+ # destination<String>:: the relative path to the destination root.
639
+ # source<String|NilClass>:: the relative path to the source root.
640
+ # config<Hash>:: give :verbose => false to not log the status.
641
+ # :: give :symbolic => false for hard link.
642
+ #
643
+ # ==== Examples
644
+ #
645
+ # create_link "config/apache.conf", "/etc/apache.conf"
646
+ #
647
+ # source://thor//lib/thor/actions/create_link.rb#17
648
+ def add_link(destination, *args); end
649
+
650
+ # Append text to a file. Since it depends on insert_into_file, it's reversible.
651
+ #
652
+ # ==== Parameters
653
+ # path<String>:: path of the file to be changed
654
+ # data<String>:: the data to append to the file, can be also given as a block.
655
+ # config<Hash>:: give :verbose => false to not log the status.
656
+ #
657
+ # ==== Example
658
+ #
659
+ # append_to_file 'config/environments/test.rb', 'config.gem "rspec"'
660
+ #
661
+ # append_to_file 'config/environments/test.rb' do
662
+ # 'config.gem "rspec"'
663
+ # end
664
+ #
665
+ # source://thor//lib/thor/actions/file_manipulation.rb#192
666
+ def append_file(path, *args, &block); end
667
+
668
+ # Append text to a file. Since it depends on insert_into_file, it's reversible.
669
+ #
670
+ # ==== Parameters
671
+ # path<String>:: path of the file to be changed
672
+ # data<String>:: the data to append to the file, can be also given as a block.
673
+ # config<Hash>:: give :verbose => false to not log the status.
674
+ #
675
+ # ==== Example
676
+ #
677
+ # append_to_file 'config/environments/test.rb', 'config.gem "rspec"'
678
+ #
679
+ # append_to_file 'config/environments/test.rb' do
680
+ # 'config.gem "rspec"'
681
+ # end
682
+ #
683
+ # source://thor//lib/thor/actions/file_manipulation.rb#192
684
+ def append_to_file(path, *args, &block); end
685
+
686
+ # Loads an external file and execute it in the instance binding.
687
+ #
688
+ # ==== Parameters
689
+ # path<String>:: The path to the file to execute. Can be a web address or
690
+ # a relative path from the source root.
691
+ #
692
+ # ==== Examples
693
+ #
694
+ # apply "http://gist.github.com/103208"
695
+ #
696
+ # apply "recipes/jquery.rb"
697
+ #
698
+ # source://thor//lib/thor/actions.rb#216
699
+ def apply(path, config = T.unsafe(nil)); end
700
+
701
+ # Returns the value of attribute behavior.
702
+ #
703
+ # source://thor//lib/thor/actions.rb#10
704
+ def behavior; end
705
+
706
+ # Sets the attribute behavior
707
+ #
708
+ # @param value the value to set the attribute behavior to.
709
+ #
710
+ # source://thor//lib/thor/actions.rb#10
711
+ def behavior=(_arg0); end
712
+
713
+ # Changes the mode of the given file or directory.
714
+ #
715
+ # ==== Parameters
716
+ # mode<Integer>:: the file mode
717
+ # path<String>:: the name of the file to change mode
718
+ # config<Hash>:: give :verbose => false to not log the status.
719
+ #
720
+ # ==== Example
721
+ #
722
+ # chmod "script/server", 0755
723
+ #
724
+ # source://thor//lib/thor/actions/file_manipulation.rb#145
725
+ def chmod(path, mode, config = T.unsafe(nil)); end
726
+
727
+ # Comment all lines matching a given regex. It will leave the space
728
+ # which existed before the beginning of the line in tact and will insert
729
+ # a single space after the comment hash.
730
+ #
731
+ # ==== Parameters
732
+ # path<String>:: path of the file to be changed
733
+ # flag<Regexp|String>:: the regexp or string used to decide which lines to comment
734
+ # config<Hash>:: give :verbose => false to not log the status.
735
+ #
736
+ # ==== Example
737
+ #
738
+ # comment_lines 'config/initializers/session_store.rb', /cookie_store/
739
+ #
740
+ # source://thor//lib/thor/actions/file_manipulation.rb#308
741
+ def comment_lines(path, flag, *args); end
742
+
743
+ # Copies the file from the relative source to the relative destination. If
744
+ # the destination is not given it's assumed to be equal to the source.
745
+ #
746
+ # ==== Parameters
747
+ # source<String>:: the relative path to the source root.
748
+ # destination<String>:: the relative path to the destination root.
749
+ # config<Hash>:: give :verbose => false to not log the status, and
750
+ # :mode => :preserve, to preserve the file mode from the source.
751
+ #
752
+ # ==== Examples
753
+ #
754
+ # copy_file "README", "doc/README"
755
+ #
756
+ # copy_file "doc/README"
757
+ #
758
+ # source://thor//lib/thor/actions/file_manipulation.rb#20
759
+ def copy_file(source, *args, &block); end
760
+
761
+ # Create a new file relative to the destination root with the given data,
762
+ # which is the return value of a block or a data string.
763
+ #
764
+ # ==== Parameters
765
+ # destination<String>:: the relative path to the destination root.
766
+ # data<String|NilClass>:: the data to append to the file.
767
+ # config<Hash>:: give :verbose => false to not log the status.
768
+ #
769
+ # ==== Examples
770
+ #
771
+ # create_file "lib/fun_party.rb" do
772
+ # hostname = ask("What is the virtual hostname I should use?")
773
+ # "vhost.name = #{hostname}"
774
+ # end
775
+ #
776
+ # create_file "config/apache.conf", "your apache config"
777
+ #
778
+ # source://thor//lib/thor/actions/create_file.rb#22
779
+ def create_file(destination, *args, &block); end
780
+
781
+ # Create a new file relative to the destination root from the given source.
782
+ #
783
+ # ==== Parameters
784
+ # destination<String>:: the relative path to the destination root.
785
+ # source<String|NilClass>:: the relative path to the source root.
786
+ # config<Hash>:: give :verbose => false to not log the status.
787
+ # :: give :symbolic => false for hard link.
788
+ #
789
+ # ==== Examples
790
+ #
791
+ # create_link "config/apache.conf", "/etc/apache.conf"
792
+ #
793
+ # source://thor//lib/thor/actions/create_link.rb#17
794
+ def create_link(destination, *args); end
795
+
796
+ # Returns the root for this thor class (also aliased as destination root).
797
+ #
798
+ # source://thor//lib/thor/actions.rb#99
799
+ def destination_root; end
800
+
801
+ # Sets the root for this thor class. Relatives path are added to the
802
+ # directory where the script was invoked and expanded.
803
+ #
804
+ # source://thor//lib/thor/actions.rb#106
805
+ def destination_root=(root); end
806
+
807
+ # Copies recursively the files from source directory to root directory.
808
+ # If any of the files finishes with .tt, it's considered to be a template
809
+ # and is placed in the destination without the extension .tt. If any
810
+ # empty directory is found, it's copied and all .empty_directory files are
811
+ # ignored. If any file name is wrapped within % signs, the text within
812
+ # the % signs will be executed as a method and replaced with the returned
813
+ # value. Let's suppose a doc directory with the following files:
814
+ #
815
+ # doc/
816
+ # components/.empty_directory
817
+ # README
818
+ # rdoc.rb.tt
819
+ # %app_name%.rb
820
+ #
821
+ # When invoked as:
822
+ #
823
+ # directory "doc"
824
+ #
825
+ # It will create a doc directory in the destination with the following
826
+ # files (assuming that the `app_name` method returns the value "blog"):
827
+ #
828
+ # doc/
829
+ # components/
830
+ # README
831
+ # rdoc.rb
832
+ # blog.rb
833
+ #
834
+ # <b>Encoded path note:</b> Since Thor internals use Object#respond_to? to check if it can
835
+ # expand %something%, this `something` should be a public method in the class calling
836
+ # #directory. If a method is private, Thor stack raises PrivateMethodEncodedError.
837
+ #
838
+ # ==== Parameters
839
+ # source<String>:: the relative path to the source root.
840
+ # destination<String>:: the relative path to the destination root.
841
+ # config<Hash>:: give :verbose => false to not log the status.
842
+ # If :recursive => false, does not look for paths recursively.
843
+ # If :mode => :preserve, preserve the file mode from the source.
844
+ # If :exclude_pattern => /regexp/, prevents copying files that match that regexp.
845
+ #
846
+ # ==== Examples
847
+ #
848
+ # directory "doc"
849
+ # directory "doc", "docs", :recursive => false
850
+ #
851
+ # source://thor//lib/thor/actions/directory.rb#49
852
+ def directory(source, *args, &block); end
853
+
854
+ # Creates an empty directory.
855
+ #
856
+ # ==== Parameters
857
+ # destination<String>:: the relative path to the destination root.
858
+ # config<Hash>:: give :verbose => false to not log the status.
859
+ #
860
+ # ==== Examples
861
+ #
862
+ # empty_directory "doc"
863
+ #
864
+ # source://thor//lib/thor/actions/empty_directory.rb#13
865
+ def empty_directory(destination, config = T.unsafe(nil)); end
866
+
867
+ # Receives a file or directory and search for it in the source paths.
868
+ #
869
+ # @raise [Error]
870
+ #
871
+ # source://thor//lib/thor/actions.rb#133
872
+ def find_in_source_paths(file); end
873
+
874
+ # Gets the content at the given address and places it at the given relative
875
+ # destination. If a block is given instead of destination, the content of
876
+ # the url is yielded and used as location.
877
+ #
878
+ # +get+ relies on open-uri, so passing application user input would provide
879
+ # a command injection attack vector.
880
+ #
881
+ # ==== Parameters
882
+ # source<String>:: the address of the given content.
883
+ # destination<String>:: the relative path to the destination root.
884
+ # config<Hash>:: give :verbose => false to not log the status, and
885
+ # :http_headers => <Hash> to add headers to an http request.
886
+ #
887
+ # ==== Examples
888
+ #
889
+ # get "http://gist.github.com/103208", "doc/README"
890
+ #
891
+ # get "http://gist.github.com/103208", "doc/README", :http_headers => {"Content-Type" => "application/json"}
892
+ #
893
+ # get "http://gist.github.com/103208" do |content|
894
+ # content.split("\n").first
895
+ # end
896
+ #
897
+ # source://thor//lib/thor/actions/file_manipulation.rb#81
898
+ def get(source, *args, &block); end
899
+
900
+ # Run a regular expression replacement on a file.
901
+ #
902
+ # ==== Parameters
903
+ # path<String>:: path of the file to be changed
904
+ # flag<Regexp|String>:: the regexp or string to be replaced
905
+ # replacement<String>:: the replacement, can be also given as a block
906
+ # config<Hash>:: give :verbose => false to not log the status, and
907
+ # :force => true, to force the replacement regardless of runner behavior.
908
+ #
909
+ # ==== Example
910
+ #
911
+ # gsub_file 'app/controllers/application_controller.rb', /#\s*(filter_parameter_logging :password)/, '\1'
912
+ #
913
+ # gsub_file 'README', /rake/, :green do |match|
914
+ # match << " no more. Use thor!"
915
+ # end
916
+ #
917
+ # source://thor//lib/thor/actions/file_manipulation.rb#262
918
+ def gsub_file(path, flag, *args, &block); end
919
+
920
+ # Goes to the root and execute the given block.
921
+ #
922
+ # source://thor//lib/thor/actions.rb#200
923
+ def in_root; end
924
+
925
+ # Injects text right after the class definition. Since it depends on
926
+ # insert_into_file, it's reversible.
927
+ #
928
+ # ==== Parameters
929
+ # path<String>:: path of the file to be changed
930
+ # klass<String|Class>:: the class to be manipulated
931
+ # data<String>:: the data to append to the class, can be also given as a block.
932
+ # config<Hash>:: give :verbose => false to not log the status.
933
+ #
934
+ # ==== Examples
935
+ #
936
+ # inject_into_class "app/controllers/application_controller.rb", "ApplicationController", " filter_parameter :password\n"
937
+ #
938
+ # inject_into_class "app/controllers/application_controller.rb", "ApplicationController" do
939
+ # " filter_parameter :password\n"
940
+ # end
941
+ #
942
+ # source://thor//lib/thor/actions/file_manipulation.rb#216
943
+ def inject_into_class(path, klass, *args, &block); end
944
+
945
+ # source://thor//lib/thor/actions/inject_into_file.rb#26
946
+ def inject_into_file(destination, *args, &block); end
947
+
948
+ # Injects text right after the module definition. Since it depends on
949
+ # insert_into_file, it's reversible.
950
+ #
951
+ # ==== Parameters
952
+ # path<String>:: path of the file to be changed
953
+ # module_name<String|Class>:: the module to be manipulated
954
+ # data<String>:: the data to append to the class, can be also given as a block.
955
+ # config<Hash>:: give :verbose => false to not log the status.
956
+ #
957
+ # ==== Examples
958
+ #
959
+ # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper", " def help; 'help'; end\n"
960
+ #
961
+ # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper" do
962
+ # " def help; 'help'; end\n"
963
+ # end
964
+ #
965
+ # source://thor//lib/thor/actions/file_manipulation.rb#239
966
+ def inject_into_module(path, module_name, *args, &block); end
967
+
968
+ # source://thor//lib/thor/actions/inject_into_file.rb#26
969
+ def insert_into_file(destination, *args, &block); end
970
+
971
+ # Do something in the root or on a provided subfolder. If a relative path
972
+ # is given it's referenced from the current root. The full path is yielded
973
+ # to the block you provide. The path is set back to the previous path when
974
+ # the method exits.
975
+ #
976
+ # Returns the value yielded by the block.
977
+ #
978
+ # ==== Parameters
979
+ # dir<String>:: the directory to move to.
980
+ # config<Hash>:: give :verbose => true to log and use padding.
981
+ #
982
+ # source://thor//lib/thor/actions.rb#170
983
+ def inside(dir = T.unsafe(nil), config = T.unsafe(nil), &block); end
984
+
985
+ # Links the file from the relative source to the relative destination. If
986
+ # the destination is not given it's assumed to be equal to the source.
987
+ #
988
+ # ==== Parameters
989
+ # source<String>:: the relative path to the source root.
990
+ # destination<String>:: the relative path to the destination root.
991
+ # config<Hash>:: give :verbose => false to not log the status.
992
+ #
993
+ # ==== Examples
994
+ #
995
+ # link_file "README", "doc/README"
996
+ #
997
+ # link_file "doc/README"
998
+ #
999
+ # source://thor//lib/thor/actions/file_manipulation.rb#50
1000
+ def link_file(source, *args); end
1001
+
1002
+ # Prepend text to a file. Since it depends on insert_into_file, it's reversible.
1003
+ #
1004
+ # ==== Parameters
1005
+ # path<String>:: path of the file to be changed
1006
+ # data<String>:: the data to prepend to the file, can be also given as a block.
1007
+ # config<Hash>:: give :verbose => false to not log the status.
1008
+ #
1009
+ # ==== Example
1010
+ #
1011
+ # prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"'
1012
+ #
1013
+ # prepend_to_file 'config/environments/test.rb' do
1014
+ # 'config.gem "rspec"'
1015
+ # end
1016
+ #
1017
+ # source://thor//lib/thor/actions/file_manipulation.rb#170
1018
+ def prepend_file(path, *args, &block); end
1019
+
1020
+ # Prepend text to a file. Since it depends on insert_into_file, it's reversible.
1021
+ #
1022
+ # ==== Parameters
1023
+ # path<String>:: path of the file to be changed
1024
+ # data<String>:: the data to prepend to the file, can be also given as a block.
1025
+ # config<Hash>:: give :verbose => false to not log the status.
1026
+ #
1027
+ # ==== Example
1028
+ #
1029
+ # prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"'
1030
+ #
1031
+ # prepend_to_file 'config/environments/test.rb' do
1032
+ # 'config.gem "rspec"'
1033
+ # end
1034
+ #
1035
+ # source://thor//lib/thor/actions/file_manipulation.rb#170
1036
+ def prepend_to_file(path, *args, &block); end
1037
+
1038
+ # Returns the given path relative to the absolute root (ie, root where
1039
+ # the script started).
1040
+ #
1041
+ # source://thor//lib/thor/actions.rb#114
1042
+ def relative_to_original_destination_root(path, remove_dot = T.unsafe(nil)); end
1043
+
1044
+ # Removes a file at the given location.
1045
+ #
1046
+ # ==== Parameters
1047
+ # path<String>:: path of the file to be changed
1048
+ # config<Hash>:: give :verbose => false to not log the status.
1049
+ #
1050
+ # ==== Example
1051
+ #
1052
+ # remove_file 'README'
1053
+ # remove_file 'app/controllers/application_controller.rb'
1054
+ #
1055
+ # source://thor//lib/thor/actions/file_manipulation.rb#325
1056
+ def remove_dir(path, config = T.unsafe(nil)); end
1057
+
1058
+ # Removes a file at the given location.
1059
+ #
1060
+ # ==== Parameters
1061
+ # path<String>:: path of the file to be changed
1062
+ # config<Hash>:: give :verbose => false to not log the status.
1063
+ #
1064
+ # ==== Example
1065
+ #
1066
+ # remove_file 'README'
1067
+ # remove_file 'app/controllers/application_controller.rb'
1068
+ #
1069
+ # source://thor//lib/thor/actions/file_manipulation.rb#325
1070
+ def remove_file(path, config = T.unsafe(nil)); end
1071
+
1072
+ # Executes a command returning the contents of the command.
1073
+ #
1074
+ # ==== Parameters
1075
+ # command<String>:: the command to be executed.
1076
+ # config<Hash>:: give :verbose => false to not log the status, :capture => true to hide to output. Specify :with
1077
+ # to append an executable to command execution.
1078
+ #
1079
+ # ==== Example
1080
+ #
1081
+ # inside('vendor') do
1082
+ # run('ln -s ~/edge rails')
1083
+ # end
1084
+ #
1085
+ # source://thor//lib/thor/actions.rb#248
1086
+ def run(command, config = T.unsafe(nil)); end
1087
+
1088
+ # Executes a ruby script (taking into account WIN32 platform quirks).
1089
+ #
1090
+ # ==== Parameters
1091
+ # command<String>:: the command to be executed.
1092
+ # config<Hash>:: give :verbose => false to not log the status.
1093
+ #
1094
+ # source://thor//lib/thor/actions.rb#285
1095
+ def run_ruby_script(command, config = T.unsafe(nil)); end
1096
+
1097
+ # Holds source paths in instance so they can be manipulated.
1098
+ #
1099
+ # source://thor//lib/thor/actions.rb#127
1100
+ def source_paths; end
1101
+
1102
+ # Gets an ERB template at the relative source, executes it and makes a copy
1103
+ # at the relative destination. If the destination is not given it's assumed
1104
+ # to be equal to the source removing .tt from the filename.
1105
+ #
1106
+ # ==== Parameters
1107
+ # source<String>:: the relative path to the source root.
1108
+ # destination<String>:: the relative path to the destination root.
1109
+ # config<Hash>:: give :verbose => false to not log the status.
1110
+ #
1111
+ # ==== Examples
1112
+ #
1113
+ # template "README", "doc/README"
1114
+ #
1115
+ # template "doc/README"
1116
+ #
1117
+ # source://thor//lib/thor/actions/file_manipulation.rb#117
1118
+ def template(source, *args, &block); end
1119
+
1120
+ # Run a thor command. A hash of options can be given and it's converted to
1121
+ # switches.
1122
+ #
1123
+ # ==== Parameters
1124
+ # command<String>:: the command to be invoked
1125
+ # args<Array>:: arguments to the command
1126
+ # config<Hash>:: give :verbose => false to not log the status, :capture => true to hide to output.
1127
+ # Other options are given as parameter to Thor.
1128
+ #
1129
+ #
1130
+ # ==== Examples
1131
+ #
1132
+ # thor :install, "http://gist.github.com/103208"
1133
+ # #=> thor install http://gist.github.com/103208
1134
+ #
1135
+ # thor :list, :all => true, :substring => 'rails'
1136
+ # #=> thor list --all --substring=rails
1137
+ #
1138
+ # source://thor//lib/thor/actions.rb#308
1139
+ def thor(command, *args); end
1140
+
1141
+ # Uncomment all lines matching a given regex. Preserves indentation before
1142
+ # the comment hash and removes the hash and any immediate following space.
1143
+ #
1144
+ # ==== Parameters
1145
+ # path<String>:: path of the file to be changed
1146
+ # flag<Regexp|String>:: the regexp or string used to decide which lines to uncomment
1147
+ # config<Hash>:: give :verbose => false to not log the status.
1148
+ #
1149
+ # ==== Example
1150
+ #
1151
+ # uncomment_lines 'config/initializers/session_store.rb', /active_record/
1152
+ #
1153
+ # source://thor//lib/thor/actions/file_manipulation.rb#289
1154
+ def uncomment_lines(path, flag, *args); end
1155
+
1156
+ protected
1157
+
1158
+ # source://thor//lib/thor/actions.rb#329
1159
+ def _cleanup_options_and_set(options, key); end
1160
+
1161
+ # Allow current root to be shared between invocations.
1162
+ #
1163
+ # source://thor//lib/thor/actions.rb#325
1164
+ def _shared_configuration; end
1165
+
1166
+ private
1167
+
1168
+ # source://thor//lib/thor/actions/file_manipulation.rb#346
1169
+ def capture(*args); end
1170
+
1171
+ # source://thor//lib/thor/actions/file_manipulation.rb#342
1172
+ def concat(string); end
1173
+
1174
+ # Returns the value of attribute output_buffer.
1175
+ #
1176
+ # source://thor//lib/thor/actions/file_manipulation.rb#337
1177
+ def output_buffer; end
1178
+
1179
+ # Sets the attribute output_buffer
1180
+ #
1181
+ # @param value the value to set the attribute output_buffer to.
1182
+ #
1183
+ # source://thor//lib/thor/actions/file_manipulation.rb#337
1184
+ def output_buffer=(_arg0); end
1185
+
1186
+ # source://thor//lib/thor/actions/file_manipulation.rb#350
1187
+ def with_output_buffer(buf = T.unsafe(nil)); end
1188
+
1189
+ class << self
1190
+ # source://thor//lib/thor/actions.rb#12
1191
+ def included(base); end
1192
+ end
1193
+ end
1194
+
1195
+ # Thor::Actions#capture depends on what kind of buffer is used in ERB.
1196
+ # Thus CapturableERB fixes ERB to use String buffer.
1197
+ #
1198
+ # source://thor//lib/thor/actions/file_manipulation.rb#362
1199
+ class Thor::Actions::CapturableERB < ::ERB
1200
+ # source://thor//lib/thor/actions/file_manipulation.rb#363
1201
+ def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end
1202
+ end
1203
+
1204
+ # source://thor//lib/thor/actions.rb#17
1205
+ module Thor::Actions::ClassMethods
1206
+ # Add runtime options that help actions execution.
1207
+ #
1208
+ # source://thor//lib/thor/actions.rb#48
1209
+ def add_runtime_options!; end
1210
+
1211
+ # Hold source paths for one Thor instance. source_paths_for_search is the
1212
+ # method responsible to gather source_paths from this current class,
1213
+ # inherited paths and the source root.
1214
+ #
1215
+ # source://thor//lib/thor/actions.rb#22
1216
+ def source_paths; end
1217
+
1218
+ # Returns the source paths in the following order:
1219
+ #
1220
+ # 1) This class source paths
1221
+ # 2) Source root
1222
+ # 3) Parents source paths
1223
+ #
1224
+ # source://thor//lib/thor/actions.rb#38
1225
+ def source_paths_for_search; end
1226
+
1227
+ # Stores and return the source root for this class
1228
+ #
1229
+ # source://thor//lib/thor/actions.rb#27
1230
+ def source_root(path = T.unsafe(nil)); end
1231
+ end
1232
+
1233
+ # CreateFile is a subset of Template, which instead of rendering a file with
1234
+ # ERB, it gets the content from the user.
1235
+ #
1236
+ # source://thor//lib/thor/actions/create_file.rb#32
1237
+ class Thor::Actions::CreateFile < ::Thor::Actions::EmptyDirectory
1238
+ # @return [CreateFile] a new instance of CreateFile
1239
+ #
1240
+ # source://thor//lib/thor/actions/create_file.rb#35
1241
+ def initialize(base, destination, data, config = T.unsafe(nil)); end
1242
+
1243
+ # source://thor//lib/thor/actions/create_file.rb#33
1244
+ def data; end
1245
+
1246
+ # Checks if the content of the file at the destination is identical to the rendered result.
1247
+ #
1248
+ # ==== Returns
1249
+ # Boolean:: true if it is identical, false otherwise.
1250
+ #
1251
+ # @return [Boolean]
1252
+ #
1253
+ # source://thor//lib/thor/actions/create_file.rb#45
1254
+ def identical?; end
1255
+
1256
+ # source://thor//lib/thor/actions/create_file.rb#60
1257
+ def invoke!; end
1258
+
1259
+ # Holds the content to be added to the file.
1260
+ #
1261
+ # source://thor//lib/thor/actions/create_file.rb#52
1262
+ def render; end
1263
+
1264
+ protected
1265
+
1266
+ # Shows the file collision menu to the user and gets the result.
1267
+ #
1268
+ # @return [Boolean]
1269
+ #
1270
+ # source://thor//lib/thor/actions/create_file.rb#100
1271
+ def force_on_collision?; end
1272
+
1273
+ # If force is true, run the action, otherwise check if it's not being
1274
+ # skipped. If both are false, show the file_collision menu, if the menu
1275
+ # returns true, force it, otherwise skip.
1276
+ #
1277
+ # source://thor//lib/thor/actions/create_file.rb#86
1278
+ def force_or_skip_or_conflict(force, skip, &block); end
1279
+
1280
+ # Now on conflict we check if the file is identical or not.
1281
+ #
1282
+ # source://thor//lib/thor/actions/create_file.rb#73
1283
+ def on_conflict_behavior(&block); end
1284
+ end
1285
+
1286
+ # CreateLink is a subset of CreateFile, which instead of taking a block of
1287
+ # data, just takes a source string from the user.
1288
+ #
1289
+ # source://thor//lib/thor/actions/create_link.rb#27
1290
+ class Thor::Actions::CreateLink < ::Thor::Actions::CreateFile
1291
+ # source://thor//lib/thor/actions/create_link.rb#28
1292
+ def data; end
1293
+
1294
+ # @return [Boolean]
1295
+ #
1296
+ # source://thor//lib/thor/actions/create_link.rb#56
1297
+ def exists?; end
1298
+
1299
+ # Checks if the content of the file at the destination is identical to the rendered result.
1300
+ #
1301
+ # ==== Returns
1302
+ # Boolean:: true if it is identical, false otherwise.
1303
+ #
1304
+ # @return [Boolean]
1305
+ #
1306
+ # source://thor//lib/thor/actions/create_link.rb#35
1307
+ def identical?; end
1308
+
1309
+ # source://thor//lib/thor/actions/create_link.rb#40
1310
+ def invoke!; end
1311
+ end
1312
+
1313
+ # source://thor//lib/thor/actions/directory.rb#55
1314
+ class Thor::Actions::Directory < ::Thor::Actions::EmptyDirectory
1315
+ # @return [Directory] a new instance of Directory
1316
+ #
1317
+ # source://thor//lib/thor/actions/directory.rb#58
1318
+ def initialize(base, source, destination = T.unsafe(nil), config = T.unsafe(nil), &block); end
1319
+
1320
+ # source://thor//lib/thor/actions/directory.rb#64
1321
+ def invoke!; end
1322
+
1323
+ # source://thor//lib/thor/actions/directory.rb#69
1324
+ def revoke!; end
1325
+
1326
+ # Returns the value of attribute source.
1327
+ #
1328
+ # source://thor//lib/thor/actions/directory.rb#56
1329
+ def source; end
1330
+
1331
+ protected
1332
+
1333
+ # source://thor//lib/thor/actions/directory.rb#75
1334
+ def execute!; end
1335
+
1336
+ # source://thor//lib/thor/actions/directory.rb#99
1337
+ def file_level_lookup(previous_lookup); end
1338
+
1339
+ # source://thor//lib/thor/actions/directory.rb#103
1340
+ def files(lookup); end
1341
+ end
1342
+
1343
+ # source://thor//lib/thor/actions/empty_directory.rb#23
1344
+ class Thor::Actions::EmptyDirectory
1345
+ # Initializes given the source and destination.
1346
+ #
1347
+ # ==== Parameters
1348
+ # base<Thor::Base>:: A Thor::Base instance
1349
+ # source<String>:: Relative path to the source of this file
1350
+ # destination<String>:: Relative path to the destination of this file
1351
+ # config<Hash>:: give :verbose => false to not log the status.
1352
+ #
1353
+ # @return [EmptyDirectory] a new instance of EmptyDirectory
1354
+ #
1355
+ # source://thor//lib/thor/actions/empty_directory.rb#34
1356
+ def initialize(base, destination, config = T.unsafe(nil)); end
1357
+
1358
+ # source://thor//lib/thor/actions/empty_directory.rb#24
1359
+ def base; end
1360
+
1361
+ # source://thor//lib/thor/actions/empty_directory.rb#24
1362
+ def config; end
1363
+
1364
+ # source://thor//lib/thor/actions/empty_directory.rb#24
1365
+ def destination; end
1366
+
1367
+ # Checks if the destination file already exists.
1368
+ #
1369
+ # ==== Returns
1370
+ # Boolean:: true if the file exists, false otherwise.
1371
+ #
1372
+ # @return [Boolean]
1373
+ #
1374
+ # source://thor//lib/thor/actions/empty_directory.rb#45
1375
+ def exists?; end
1376
+
1377
+ # source://thor//lib/thor/actions/empty_directory.rb#24
1378
+ def given_destination; end
1379
+
1380
+ # source://thor//lib/thor/actions/empty_directory.rb#49
1381
+ def invoke!; end
1382
+
1383
+ # source://thor//lib/thor/actions/empty_directory.rb#24
1384
+ def relative_destination; end
1385
+
1386
+ # source://thor//lib/thor/actions/empty_directory.rb#56
1387
+ def revoke!; end
1388
+
1389
+ protected
1390
+
1391
+ # Filenames in the encoded form are converted. If you have a file:
1392
+ #
1393
+ # %file_name%.rb
1394
+ #
1395
+ # It calls #file_name from the base and replaces %-string with the
1396
+ # return value (should be String) of #file_name:
1397
+ #
1398
+ # user.rb
1399
+ #
1400
+ # The method referenced can be either public or private.
1401
+ #
1402
+ # source://thor//lib/thor/actions/empty_directory.rb#103
1403
+ def convert_encoded_instructions(filename); end
1404
+
1405
+ # Sets the absolute destination value from a relative destination value.
1406
+ # It also stores the given and relative destination. Let's suppose our
1407
+ # script is being executed on "dest", it sets the destination root to
1408
+ # "dest". The destination, given_destination and relative_destination
1409
+ # are related in the following way:
1410
+ #
1411
+ # inside "bar" do
1412
+ # empty_directory "baz"
1413
+ # end
1414
+ #
1415
+ # destination #=> dest/bar/baz
1416
+ # relative_destination #=> bar/baz
1417
+ # given_destination #=> baz
1418
+ #
1419
+ # source://thor//lib/thor/actions/empty_directory.rb#85
1420
+ def destination=(destination); end
1421
+
1422
+ # Receives a hash of options and just execute the block if some
1423
+ # conditions are met.
1424
+ #
1425
+ # source://thor//lib/thor/actions/empty_directory.rb#113
1426
+ def invoke_with_conflict_check(&block); end
1427
+
1428
+ # What to do when the destination file already exists.
1429
+ #
1430
+ # source://thor//lib/thor/actions/empty_directory.rb#132
1431
+ def on_conflict_behavior; end
1432
+
1433
+ # source://thor//lib/thor/actions/empty_directory.rb#126
1434
+ def on_file_clash_behavior; end
1435
+
1436
+ # Shortcut for pretend.
1437
+ #
1438
+ # @return [Boolean]
1439
+ #
1440
+ # source://thor//lib/thor/actions/empty_directory.rb#67
1441
+ def pretend?; end
1442
+
1443
+ # Shortcut to say_status shell method.
1444
+ #
1445
+ # source://thor//lib/thor/actions/empty_directory.rb#138
1446
+ def say_status(status, color); end
1447
+ end
1448
+
1449
+ # source://thor//lib/thor/actions/inject_into_file.rb#36
1450
+ class Thor::Actions::InjectIntoFile < ::Thor::Actions::EmptyDirectory
1451
+ # @return [InjectIntoFile] a new instance of InjectIntoFile
1452
+ #
1453
+ # source://thor//lib/thor/actions/inject_into_file.rb#39
1454
+ def initialize(base, destination, data, config); end
1455
+
1456
+ # Returns the value of attribute behavior.
1457
+ #
1458
+ # source://thor//lib/thor/actions/inject_into_file.rb#37
1459
+ def behavior; end
1460
+
1461
+ # Returns the value of attribute flag.
1462
+ #
1463
+ # source://thor//lib/thor/actions/inject_into_file.rb#37
1464
+ def flag; end
1465
+
1466
+ # source://thor//lib/thor/actions/inject_into_file.rb#52
1467
+ def invoke!; end
1468
+
1469
+ # Returns the value of attribute replacement.
1470
+ #
1471
+ # source://thor//lib/thor/actions/inject_into_file.rb#37
1472
+ def replacement; end
1473
+
1474
+ # source://thor//lib/thor/actions/inject_into_file.rb#74
1475
+ def revoke!; end
1476
+
1477
+ protected
1478
+
1479
+ # source://thor//lib/thor/actions/inject_into_file.rb#110
1480
+ def content; end
1481
+
1482
+ # Adds the content to the file.
1483
+ #
1484
+ # source://thor//lib/thor/actions/inject_into_file.rb#120
1485
+ def replace!(regexp, string, force); end
1486
+
1487
+ # @return [Boolean]
1488
+ #
1489
+ # source://thor//lib/thor/actions/inject_into_file.rb#114
1490
+ def replacement_present?; end
1491
+
1492
+ # source://thor//lib/thor/actions/inject_into_file.rb#90
1493
+ def say_status(behavior, warning: T.unsafe(nil), color: T.unsafe(nil)); end
1494
+ end
1495
+
1496
+ # Injects the given content into a file. Different from gsub_file, this
1497
+ # method is reversible.
1498
+ #
1499
+ # ==== Parameters
1500
+ # destination<String>:: Relative path to the destination root
1501
+ # data<String>:: Data to add to the file. Can be given as a block.
1502
+ # config<Hash>:: give :verbose => false to not log the status and the flag
1503
+ # for injection (:after or :before) or :force => true for
1504
+ # insert two or more times the same content.
1505
+ #
1506
+ # ==== Examples
1507
+ #
1508
+ # insert_into_file "config/environment.rb", "config.gem :thor", :after => "Rails::Initializer.run do |config|\n"
1509
+ #
1510
+ # insert_into_file "config/environment.rb", :after => "Rails::Initializer.run do |config|\n" do
1511
+ # gems = ask "Which gems would you like to add?"
1512
+ # gems.split(" ").map{ |gem| " config.gem :#{gem}" }.join("\n")
1513
+ # end
1514
+ #
1515
+ # source://thor//lib/thor/actions/inject_into_file.rb#24
1516
+ Thor::Actions::WARNINGS = T.let(T.unsafe(nil), Hash)
1517
+
1518
+ # source://thor//lib/thor/error.rb#57
1519
+ class Thor::AmbiguousCommandError < ::Thor::Error; end
1520
+
1521
+ # source://thor//lib/thor/error.rb#59
1522
+ Thor::AmbiguousTaskError = Thor::AmbiguousCommandError
1523
+
1524
+ # source://thor//lib/thor/parser/argument.rb#2
1525
+ class Thor::Argument
1526
+ # @raise [ArgumentError]
1527
+ # @return [Argument] a new instance of Argument
1528
+ #
1529
+ # source://thor//lib/thor/parser/argument.rb#8
1530
+ def initialize(name, options = T.unsafe(nil)); end
1531
+
1532
+ # Returns the value of attribute banner.
1533
+ #
1534
+ # source://thor//lib/thor/parser/argument.rb#5
1535
+ def banner; end
1536
+
1537
+ # Returns the value of attribute default.
1538
+ #
1539
+ # source://thor//lib/thor/parser/argument.rb#5
1540
+ def default; end
1541
+
1542
+ # Returns the value of attribute description.
1543
+ #
1544
+ # source://thor//lib/thor/parser/argument.rb#5
1545
+ def description; end
1546
+
1547
+ # Returns the value of attribute enum.
1548
+ #
1549
+ # source://thor//lib/thor/parser/argument.rb#5
1550
+ def enum; end
1551
+
1552
+ # source://thor//lib/thor/parser/argument.rb#52
1553
+ def enum_to_s; end
1554
+
1555
+ # Returns the value of attribute name.
1556
+ #
1557
+ # source://thor//lib/thor/parser/argument.rb#5
1558
+ def human_name; end
1559
+
1560
+ # Returns the value of attribute name.
1561
+ #
1562
+ # source://thor//lib/thor/parser/argument.rb#5
1563
+ def name; end
1564
+
1565
+ # source://thor//lib/thor/parser/argument.rb#27
1566
+ def print_default; end
1567
+
1568
+ # Returns the value of attribute required.
1569
+ #
1570
+ # source://thor//lib/thor/parser/argument.rb#5
1571
+ def required; end
1572
+
1573
+ # @return [Boolean]
1574
+ #
1575
+ # source://thor//lib/thor/parser/argument.rb#39
1576
+ def required?; end
1577
+
1578
+ # @return [Boolean]
1579
+ #
1580
+ # source://thor//lib/thor/parser/argument.rb#43
1581
+ def show_default?; end
1582
+
1583
+ # Returns the value of attribute type.
1584
+ #
1585
+ # source://thor//lib/thor/parser/argument.rb#5
1586
+ def type; end
1587
+
1588
+ # source://thor//lib/thor/parser/argument.rb#35
1589
+ def usage; end
1590
+
1591
+ protected
1592
+
1593
+ # source://thor//lib/thor/parser/argument.rb#71
1594
+ def default_banner; end
1595
+
1596
+ # @return [Boolean]
1597
+ #
1598
+ # source://thor//lib/thor/parser/argument.rb#67
1599
+ def valid_type?(type); end
1600
+
1601
+ # @raise [ArgumentError]
1602
+ #
1603
+ # source://thor//lib/thor/parser/argument.rb#62
1604
+ def validate!; end
1605
+ end
1606
+
1607
+ # source://thor//lib/thor/parser/argument.rb#3
1608
+ Thor::Argument::VALID_TYPES = T.let(T.unsafe(nil), Array)
1609
+
1610
+ # source://thor//lib/thor/parser/arguments.rb#2
1611
+ class Thor::Arguments
1612
+ # Takes an array of Thor::Argument objects.
1613
+ #
1614
+ # @return [Arguments] a new instance of Arguments
1615
+ #
1616
+ # source://thor//lib/thor/parser/arguments.rb#26
1617
+ def initialize(arguments = T.unsafe(nil)); end
1618
+
1619
+ # source://thor//lib/thor/parser/arguments.rb#40
1620
+ def parse(args); end
1621
+
1622
+ # source://thor//lib/thor/parser/arguments.rb#53
1623
+ def remaining; end
1624
+
1625
+ private
1626
+
1627
+ # Raises an error if @non_assigned_required array is not empty.
1628
+ #
1629
+ # @raise [RequiredArgumentMissingError]
1630
+ #
1631
+ # source://thor//lib/thor/parser/arguments.rb#186
1632
+ def check_requirement!; end
1633
+
1634
+ # @return [Boolean]
1635
+ #
1636
+ # source://thor//lib/thor/parser/arguments.rb#84
1637
+ def current_is_value?; end
1638
+
1639
+ # @return [Boolean]
1640
+ #
1641
+ # source://thor//lib/thor/parser/arguments.rb#64
1642
+ def last?; end
1643
+
1644
+ # @return [Boolean]
1645
+ #
1646
+ # source://thor//lib/thor/parser/arguments.rb#59
1647
+ def no_or_skip?(arg); end
1648
+
1649
+ # Runs through the argument array getting all strings until no string is
1650
+ # found or a switch is found.
1651
+ #
1652
+ # ["a", "b", "c"]
1653
+ #
1654
+ # And returns it as an array:
1655
+ #
1656
+ # ["a", "b", "c"]
1657
+ #
1658
+ # source://thor//lib/thor/parser/arguments.rb#118
1659
+ def parse_array(name); end
1660
+
1661
+ # Runs through the argument array getting strings that contains ":" and
1662
+ # mark it as a hash:
1663
+ #
1664
+ # [ "name:string", "age:integer" ]
1665
+ #
1666
+ # Becomes:
1667
+ #
1668
+ # { "name" => "string", "age" => "integer" }
1669
+ #
1670
+ # source://thor//lib/thor/parser/arguments.rb#97
1671
+ def parse_hash(name); end
1672
+
1673
+ # Check if the peek is numeric format and return a Float or Integer.
1674
+ # Check if the peek is included in enum if enum is provided.
1675
+ # Otherwise raises an error.
1676
+ #
1677
+ # source://thor//lib/thor/parser/arguments.rb#139
1678
+ def parse_numeric(name); end
1679
+
1680
+ # Parse string:
1681
+ # for --string-arg, just return the current value in the pile
1682
+ # for --no-string-arg, nil
1683
+ # Check if the peek is included in enum if enum is provided. Otherwise raises an error.
1684
+ #
1685
+ # source://thor//lib/thor/parser/arguments.rb#158
1686
+ def parse_string(name); end
1687
+
1688
+ # source://thor//lib/thor/parser/arguments.rb#68
1689
+ def peek; end
1690
+
1691
+ # source://thor//lib/thor/parser/arguments.rb#72
1692
+ def shift; end
1693
+
1694
+ # source://thor//lib/thor/parser/arguments.rb#76
1695
+ def unshift(arg); end
1696
+
1697
+ # Raises an error if the switch is an enum and the values aren't included on it.
1698
+ #
1699
+ # source://thor//lib/thor/parser/arguments.rb#172
1700
+ def validate_enum_value!(name, value, message); end
1701
+
1702
+ class << self
1703
+ # source://thor//lib/thor/parser/arguments.rb#19
1704
+ def parse(*args); end
1705
+
1706
+ # Receives an array of args and returns two arrays, one with arguments
1707
+ # and one with switches.
1708
+ #
1709
+ # source://thor//lib/thor/parser/arguments.rb#8
1710
+ def split(args); end
1711
+ end
1712
+ end
1713
+
1714
+ # source://thor//lib/thor/parser/arguments.rb#3
1715
+ Thor::Arguments::NUMERIC = T.let(T.unsafe(nil), Regexp)
1716
+
1717
+ # source://thor//lib/thor/error.rb#104
1718
+ class Thor::AtLeastOneRequiredArgumentError < ::Thor::InvocationError; end
1719
+
1720
+ # source://thor//lib/thor/shell.rb#4
1721
+ module Thor::Base
1722
+ include ::Thor::Invocation
1723
+ include ::Thor::Shell
1724
+
1725
+ mixes_in_class_methods ::Thor::Base::ClassMethods
1726
+ mixes_in_class_methods ::Thor::Invocation::ClassMethods
1727
+
1728
+ # It receives arguments in an Array and two hashes, one for options and
1729
+ # other for configuration.
1730
+ #
1731
+ # Notice that it does not check if all required arguments were supplied.
1732
+ # It should be done by the parser.
1733
+ #
1734
+ # ==== Parameters
1735
+ # args<Array[Object]>:: An array of objects. The objects are applied to their
1736
+ # respective accessors declared with <tt>argument</tt>.
1737
+ #
1738
+ # options<Hash>:: An options hash that will be available as self.options.
1739
+ # The hash given is converted to a hash with indifferent
1740
+ # access, magic predicates (options.skip?) and then frozen.
1741
+ #
1742
+ # config<Hash>:: Configuration for this Thor class.
1743
+ #
1744
+ # source://thor//lib/thor/base.rb#53
1745
+ def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end
1746
+
1747
+ # Returns the value of attribute args.
1748
+ #
1749
+ # source://thor//lib/thor/base.rb#35
1750
+ def args; end
1751
+
1752
+ # Sets the attribute args
1753
+ #
1754
+ # @param value the value to set the attribute args to.
1755
+ #
1756
+ # source://thor//lib/thor/base.rb#35
1757
+ def args=(_arg0); end
1758
+
1759
+ # Returns the value of attribute options.
1760
+ #
1761
+ # source://thor//lib/thor/base.rb#35
1762
+ def options; end
1763
+
1764
+ # Sets the attribute options
1765
+ #
1766
+ # @param value the value to set the attribute options to.
1767
+ #
1768
+ # source://thor//lib/thor/base.rb#35
1769
+ def options=(_arg0); end
1770
+
1771
+ # Returns the value of attribute parent_options.
1772
+ #
1773
+ # source://thor//lib/thor/base.rb#35
1774
+ def parent_options; end
1775
+
1776
+ # Sets the attribute parent_options
1777
+ #
1778
+ # @param value the value to set the attribute parent_options to.
1779
+ #
1780
+ # source://thor//lib/thor/base.rb#35
1781
+ def parent_options=(_arg0); end
1782
+
1783
+ class << self
1784
+ # source://thor//lib/thor/base.rb#116
1785
+ def included(base); end
1786
+
1787
+ # Whenever a class inherits from Thor or Thor::Group, we should track the
1788
+ # class and the file on Thor::Base. This is the method responsible for it.
1789
+ #
1790
+ # source://thor//lib/thor/base.rb#144
1791
+ def register_klass_file(klass); end
1792
+
1793
+ # Returns the shell used in all Thor classes. If you are in a Unix platform
1794
+ # it will use a colored log, otherwise it will use a basic one without color.
1795
+ #
1796
+ # source://thor//lib/thor/shell.rb#11
1797
+ def shell; end
1798
+
1799
+ # Sets the attribute shell
1800
+ #
1801
+ # @param value the value to set the attribute shell to.
1802
+ #
1803
+ # source://thor//lib/thor/shell.rb#6
1804
+ def shell=(_arg0); end
1805
+
1806
+ # Returns the files where the subclasses are kept.
1807
+ #
1808
+ # ==== Returns
1809
+ # Hash[path<String> => Class]
1810
+ #
1811
+ # source://thor//lib/thor/base.rb#137
1812
+ def subclass_files; end
1813
+
1814
+ # Returns the classes that inherits from Thor or Thor::Group.
1815
+ #
1816
+ # ==== Returns
1817
+ # Array[Class]
1818
+ #
1819
+ # source://thor//lib/thor/base.rb#128
1820
+ def subclasses; end
1821
+ end
1822
+ end
1823
+
1824
+ # source://thor//lib/thor/base.rb#153
1825
+ module Thor::Base::ClassMethods
1826
+ # Returns the commands for this Thor class and all subclasses.
1827
+ #
1828
+ # ==== Returns
1829
+ # Hash:: An ordered hash with commands names as keys and Thor::Command
1830
+ # objects as values.
1831
+ #
1832
+ # source://thor//lib/thor/base.rb#482
1833
+ def all_commands; end
1834
+
1835
+ # Returns the commands for this Thor class and all subclasses.
1836
+ #
1837
+ # ==== Returns
1838
+ # Hash:: An ordered hash with commands names as keys and Thor::Command
1839
+ # objects as values.
1840
+ #
1841
+ # source://thor//lib/thor/base.rb#482
1842
+ def all_tasks; end
1843
+
1844
+ # If you want to use defaults that don't match the type of an option,
1845
+ # either specify `check_default_type: false` or call `allow_incompatible_default_type!`
1846
+ #
1847
+ # source://thor//lib/thor/base.rb#189
1848
+ def allow_incompatible_default_type!; end
1849
+
1850
+ # Adds an argument to the class and creates an attr_accessor for it.
1851
+ #
1852
+ # Arguments are different from options in several aspects. The first one
1853
+ # is how they are parsed from the command line, arguments are retrieved
1854
+ # from position:
1855
+ #
1856
+ # thor command NAME
1857
+ #
1858
+ # Instead of:
1859
+ #
1860
+ # thor command --name=NAME
1861
+ #
1862
+ # Besides, arguments are used inside your code as an accessor (self.argument),
1863
+ # while options are all kept in a hash (self.options).
1864
+ #
1865
+ # Finally, arguments cannot have type :default or :boolean but can be
1866
+ # optional (supplying :optional => :true or :required => false), although
1867
+ # you cannot have a required argument after a non-required argument. If you
1868
+ # try it, an error is raised.
1869
+ #
1870
+ # ==== Parameters
1871
+ # name<Symbol>:: The name of the argument.
1872
+ # options<Hash>:: Described below.
1873
+ #
1874
+ # ==== Options
1875
+ # :desc - Description for the argument.
1876
+ # :required - If the argument is required or not.
1877
+ # :optional - If the argument is optional or not.
1878
+ # :type - The type of the argument, can be :string, :hash, :array, :numeric.
1879
+ # :default - Default value for this argument. It cannot be required and have default values.
1880
+ # :banner - String to show on usage notes.
1881
+ #
1882
+ # ==== Errors
1883
+ # ArgumentError:: Raised if you supply a required argument after a non required one.
1884
+ #
1885
+ # source://thor//lib/thor/base.rb#261
1886
+ def argument(name, options = T.unsafe(nil)); end
1887
+
1888
+ # Returns this class arguments, looking up in the ancestors chain.
1889
+ #
1890
+ # ==== Returns
1891
+ # Array[Thor::Argument]
1892
+ #
1893
+ # source://thor//lib/thor/base.rb#293
1894
+ def arguments; end
1895
+
1896
+ # source://thor//lib/thor/base.rb#162
1897
+ def attr_accessor(*_arg0); end
1898
+
1899
+ # source://thor//lib/thor/base.rb#154
1900
+ def attr_reader(*_arg0); end
1901
+
1902
+ # source://thor//lib/thor/base.rb#158
1903
+ def attr_writer(*_arg0); end
1904
+
1905
+ # source://thor//lib/thor/base.rb#193
1906
+ def check_default_type; end
1907
+
1908
+ # If you want to raise an error when the default value of an option does not match
1909
+ # the type call check_default_type!
1910
+ # This will be the default; for compatibility a deprecation warning is issued if necessary.
1911
+ #
1912
+ # source://thor//lib/thor/base.rb#183
1913
+ def check_default_type!; end
1914
+
1915
+ # source://thor//lib/thor/base.rb#172
1916
+ def check_unknown_options; end
1917
+
1918
+ # If you want to raise an error for unknown options, call check_unknown_options!
1919
+ # This is disabled by default to allow dynamic invocations.
1920
+ #
1921
+ # source://thor//lib/thor/base.rb#168
1922
+ def check_unknown_options!; end
1923
+
1924
+ # @return [Boolean]
1925
+ #
1926
+ # source://thor//lib/thor/base.rb#176
1927
+ def check_unknown_options?(config); end
1928
+
1929
+ # Adds and declares option group for required at least one of options in the
1930
+ # block and arguments. You can declare options as the outside of the block.
1931
+ #
1932
+ # ==== Examples
1933
+ #
1934
+ # class_at_least_one do
1935
+ # class_option :one
1936
+ # class_option :two
1937
+ # end
1938
+ #
1939
+ # Or
1940
+ #
1941
+ # class_option :one
1942
+ # class_option :two
1943
+ # class_at_least_one :one, :two
1944
+ #
1945
+ # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError
1946
+ # will be raised.
1947
+ #
1948
+ # You can use class_at_least_one and class_exclusive at the same time.
1949
+ #
1950
+ # class_exclusive do
1951
+ # class_at_least_one do
1952
+ # class_option :one
1953
+ # class_option :two
1954
+ # end
1955
+ # end
1956
+ #
1957
+ # Then it is required either only one of "--one" or "--two".
1958
+ #
1959
+ # source://thor//lib/thor/base.rb#392
1960
+ def class_at_least_one(*args, &block); end
1961
+
1962
+ # Returns this class at least one of required options array set, looking up in the ancestors chain.
1963
+ #
1964
+ # ==== Returns
1965
+ # Array[Array[Thor::Option.name]]
1966
+ #
1967
+ # source://thor//lib/thor/base.rb#411
1968
+ def class_at_least_one_option_names; end
1969
+
1970
+ # Adds and declares option group for exclusive options in the
1971
+ # block and arguments. You can declare options as the outside of the block.
1972
+ #
1973
+ # ==== Parameters
1974
+ # Array[Thor::Option.name]
1975
+ #
1976
+ # ==== Examples
1977
+ #
1978
+ # class_exclusive do
1979
+ # class_option :one
1980
+ # class_option :two
1981
+ # end
1982
+ #
1983
+ # Or
1984
+ #
1985
+ # class_option :one
1986
+ # class_option :two
1987
+ # class_exclusive :one, :two
1988
+ #
1989
+ # If you give "--one" and "--two" at the same time ExclusiveArgumentsError
1990
+ # will be raised.
1991
+ #
1992
+ # source://thor//lib/thor/base.rb#357
1993
+ def class_exclusive(*args, &block); end
1994
+
1995
+ # Returns this class exclusive options array set, looking up in the ancestors chain.
1996
+ #
1997
+ # ==== Returns
1998
+ # Array[Array[Thor::Option.name]]
1999
+ #
2000
+ # source://thor//lib/thor/base.rb#402
2001
+ def class_exclusive_option_names; end
2002
+
2003
+ # Adds an option to the set of class options
2004
+ #
2005
+ # ==== Parameters
2006
+ # name<Symbol>:: The name of the argument.
2007
+ # options<Hash>:: Described below.
2008
+ #
2009
+ # ==== Options
2010
+ # :desc:: -- Description for the argument.
2011
+ # :required:: -- If the argument is required or not.
2012
+ # :default:: -- Default value for this argument.
2013
+ # :group:: -- The group for this options. Use by class options to output options in different levels.
2014
+ # :aliases:: -- Aliases for this option. <b>Note:</b> Thor follows a convention of one-dash-one-letter options. Thus aliases like "-something" wouldn't be parsed; use either "\--something" or "-s" instead.
2015
+ # :type:: -- The type of the argument, can be :string, :hash, :array, :numeric or :boolean.
2016
+ # :banner:: -- String to show on usage notes.
2017
+ # :hide:: -- If you want to hide this option from the help.
2018
+ #
2019
+ # source://thor//lib/thor/base.rb#328
2020
+ def class_option(name, options = T.unsafe(nil)); end
2021
+
2022
+ # Adds a bunch of options to the set of class options.
2023
+ #
2024
+ # class_options :foo => false, :bar => :required, :baz => :string
2025
+ #
2026
+ # If you prefer more detailed declaration, check class_option.
2027
+ #
2028
+ # ==== Parameters
2029
+ # Hash[Symbol => Object]
2030
+ #
2031
+ # source://thor//lib/thor/base.rb#306
2032
+ def class_options(options = T.unsafe(nil)); end
2033
+
2034
+ # Returns the commands for this Thor class.
2035
+ #
2036
+ # ==== Returns
2037
+ # Hash:: An ordered hash with commands names as keys and Thor::Command
2038
+ # objects as values.
2039
+ #
2040
+ # source://thor//lib/thor/base.rb#471
2041
+ def commands; end
2042
+
2043
+ # If true, option set will not suspend the execution of the command when
2044
+ # a required option is not provided.
2045
+ #
2046
+ # @return [Boolean]
2047
+ #
2048
+ # source://thor//lib/thor/base.rb#207
2049
+ def disable_required_check?(command_name); end
2050
+
2051
+ # A flag that makes the process exit with status 1 if any error happens.
2052
+ #
2053
+ # @return [Boolean]
2054
+ #
2055
+ # source://thor//lib/thor/base.rb#628
2056
+ def exit_on_failure?; end
2057
+
2058
+ # Defines the group. This is used when thor list is invoked so you can specify
2059
+ # that only commands from a pre-defined group will be shown. Defaults to standard.
2060
+ #
2061
+ # ==== Parameters
2062
+ # name<String|Symbol>
2063
+ #
2064
+ # source://thor//lib/thor/base.rb#457
2065
+ def group(name = T.unsafe(nil)); end
2066
+
2067
+ # @raise [InvocationError]
2068
+ #
2069
+ # source://thor//lib/thor/base.rb#618
2070
+ def handle_argument_error(command, error, args, arity); end
2071
+
2072
+ # @raise [UndefinedCommandError]
2073
+ #
2074
+ # source://thor//lib/thor/base.rb#613
2075
+ def handle_no_command_error(command, has_namespace = T.unsafe(nil)); end
2076
+
2077
+ # @raise [UndefinedCommandError]
2078
+ #
2079
+ # source://thor//lib/thor/base.rb#613
2080
+ def handle_no_task_error(command, has_namespace = T.unsafe(nil)); end
2081
+
2082
+ # Sets the namespace for the Thor or Thor::Group class. By default the
2083
+ # namespace is retrieved from the class name. If your Thor class is named
2084
+ # Scripts::MyScript, the help method, for example, will be called as:
2085
+ #
2086
+ # thor scripts:my_script -h
2087
+ #
2088
+ # If you change the namespace:
2089
+ #
2090
+ # namespace :my_scripts
2091
+ #
2092
+ # You change how your commands are invoked:
2093
+ #
2094
+ # thor my_scripts -h
2095
+ #
2096
+ # Finally, if you change your namespace to default:
2097
+ #
2098
+ # namespace :default
2099
+ #
2100
+ # Your commands can be invoked with a shortcut. Instead of:
2101
+ #
2102
+ # thor :my_command
2103
+ #
2104
+ # source://thor//lib/thor/base.rb#566
2105
+ def namespace(name = T.unsafe(nil)); end
2106
+
2107
+ # All methods defined inside the given block are not added as commands.
2108
+ #
2109
+ # So you can do:
2110
+ #
2111
+ # class MyScript < Thor
2112
+ # no_commands do
2113
+ # def this_is_not_a_command
2114
+ # end
2115
+ # end
2116
+ # end
2117
+ #
2118
+ # You can also add the method and remove it from the command list:
2119
+ #
2120
+ # class MyScript < Thor
2121
+ # def this_is_not_a_command
2122
+ # end
2123
+ # remove_command :this_is_not_a_command
2124
+ # end
2125
+ #
2126
+ # source://thor//lib/thor/base.rb#530
2127
+ def no_commands(&block); end
2128
+
2129
+ # @return [Boolean]
2130
+ #
2131
+ # source://thor//lib/thor/base.rb#540
2132
+ def no_commands?; end
2133
+
2134
+ # source://thor//lib/thor/base.rb#536
2135
+ def no_commands_context; end
2136
+
2137
+ # All methods defined inside the given block are not added as commands.
2138
+ #
2139
+ # So you can do:
2140
+ #
2141
+ # class MyScript < Thor
2142
+ # no_commands do
2143
+ # def this_is_not_a_command
2144
+ # end
2145
+ # end
2146
+ # end
2147
+ #
2148
+ # You can also add the method and remove it from the command list:
2149
+ #
2150
+ # class MyScript < Thor
2151
+ # def this_is_not_a_command
2152
+ # end
2153
+ # remove_command :this_is_not_a_command
2154
+ # end
2155
+ #
2156
+ # source://thor//lib/thor/base.rb#530
2157
+ def no_tasks(&block); end
2158
+
2159
+ # Allows to use private methods from parent in child classes as commands.
2160
+ #
2161
+ # ==== Parameters
2162
+ # names<Array>:: Method names to be used as commands
2163
+ #
2164
+ # ==== Examples
2165
+ #
2166
+ # public_command :foo
2167
+ # public_command :foo, :bar, :baz
2168
+ #
2169
+ # source://thor//lib/thor/base.rb#606
2170
+ def public_command(*names); end
2171
+
2172
+ # Allows to use private methods from parent in child classes as commands.
2173
+ #
2174
+ # ==== Parameters
2175
+ # names<Array>:: Method names to be used as commands
2176
+ #
2177
+ # ==== Examples
2178
+ #
2179
+ # public_command :foo
2180
+ # public_command :foo, :bar, :baz
2181
+ #
2182
+ # source://thor//lib/thor/base.rb#606
2183
+ def public_task(*names); end
2184
+
2185
+ # Removes a previous defined argument. If :undefine is given, undefine
2186
+ # accessors as well.
2187
+ #
2188
+ # ==== Parameters
2189
+ # names<Array>:: Arguments to be removed
2190
+ #
2191
+ # ==== Examples
2192
+ #
2193
+ # remove_argument :foo
2194
+ # remove_argument :foo, :bar, :baz, :undefine => true
2195
+ #
2196
+ # source://thor//lib/thor/base.rb#426
2197
+ def remove_argument(*names); end
2198
+
2199
+ # Removes a previous defined class option.
2200
+ #
2201
+ # ==== Parameters
2202
+ # names<Array>:: Class options to be removed
2203
+ #
2204
+ # ==== Examples
2205
+ #
2206
+ # remove_class_option :foo
2207
+ # remove_class_option :foo, :bar, :baz
2208
+ #
2209
+ # source://thor//lib/thor/base.rb#445
2210
+ def remove_class_option(*names); end
2211
+
2212
+ # Removes a given command from this Thor class. This is usually done if you
2213
+ # are inheriting from another class and don't want it to be available
2214
+ # anymore.
2215
+ #
2216
+ # By default it only remove the mapping to the command. But you can supply
2217
+ # :undefine => true to undefine the method from the class as well.
2218
+ #
2219
+ # ==== Parameters
2220
+ # name<Symbol|String>:: The name of the command to be removed
2221
+ # options<Hash>:: You can give :undefine => true if you want commands the method
2222
+ # to be undefined from the class as well.
2223
+ #
2224
+ # source://thor//lib/thor/base.rb#500
2225
+ def remove_command(*names); end
2226
+
2227
+ # Removes a given command from this Thor class. This is usually done if you
2228
+ # are inheriting from another class and don't want it to be available
2229
+ # anymore.
2230
+ #
2231
+ # By default it only remove the mapping to the command. But you can supply
2232
+ # :undefine => true to undefine the method from the class as well.
2233
+ #
2234
+ # ==== Parameters
2235
+ # name<Symbol|String>:: The name of the command to be removed
2236
+ # options<Hash>:: You can give :undefine => true if you want commands the method
2237
+ # to be undefined from the class as well.
2238
+ #
2239
+ # source://thor//lib/thor/base.rb#500
2240
+ def remove_task(*names); end
2241
+
2242
+ # Parses the command and options from the given args, instantiate the class
2243
+ # and invoke the command. This method is used when the arguments must be parsed
2244
+ # from an array. If you are inside Ruby and want to use a Thor class, you
2245
+ # can simply initialize it:
2246
+ #
2247
+ # script = MyScript.new(args, options, config)
2248
+ # script.invoke(:command, first_arg, second_arg, third_arg)
2249
+ #
2250
+ # source://thor//lib/thor/base.rb#582
2251
+ def start(given_args = T.unsafe(nil), config = T.unsafe(nil)); end
2252
+
2253
+ # If true, option parsing is suspended as soon as an unknown option or a
2254
+ # regular argument is encountered. All remaining arguments are passed to
2255
+ # the command as regular arguments.
2256
+ #
2257
+ # @return [Boolean]
2258
+ #
2259
+ # source://thor//lib/thor/base.rb#201
2260
+ def stop_on_unknown_option?(command_name); end
2261
+
2262
+ # source://thor//lib/thor/base.rb#218
2263
+ def strict_args_position; end
2264
+
2265
+ # If you want only strict string args (useful when cascading thor classes),
2266
+ # call strict_args_position! This is disabled by default to allow dynamic
2267
+ # invocations.
2268
+ #
2269
+ # source://thor//lib/thor/base.rb#214
2270
+ def strict_args_position!; end
2271
+
2272
+ # @return [Boolean]
2273
+ #
2274
+ # source://thor//lib/thor/base.rb#222
2275
+ def strict_args_position?(config); end
2276
+
2277
+ # Returns the commands for this Thor class.
2278
+ #
2279
+ # ==== Returns
2280
+ # Hash:: An ordered hash with commands names as keys and Thor::Command
2281
+ # objects as values.
2282
+ #
2283
+ # source://thor//lib/thor/base.rb#471
2284
+ def tasks; end
2285
+
2286
+ protected
2287
+
2288
+ # SIGNATURE: Sets the baseclass. This is where the superclass lookup
2289
+ # finishes.
2290
+ #
2291
+ # source://thor//lib/thor/base.rb#777
2292
+ def baseclass; end
2293
+
2294
+ # The basename of the program invoking the thor class.
2295
+ #
2296
+ # source://thor//lib/thor/base.rb#771
2297
+ def basename; end
2298
+
2299
+ # Build an option and adds it to the given scope.
2300
+ #
2301
+ # ==== Parameters
2302
+ # name<Symbol>:: The name of the argument.
2303
+ # options<Hash>:: Described in both class_option and method_option.
2304
+ # scope<Hash>:: Options hash that is being built up
2305
+ #
2306
+ # source://thor//lib/thor/base.rb#688
2307
+ def build_option(name, options, scope); end
2308
+
2309
+ # Receives a hash of options, parse them and add to the scope. This is a
2310
+ # fast way to set a bunch of options:
2311
+ #
2312
+ # build_options :foo => true, :bar => :required, :baz => :string
2313
+ #
2314
+ # ==== Parameters
2315
+ # Hash[Symbol => Object]
2316
+ #
2317
+ # source://thor//lib/thor/base.rb#699
2318
+ def build_options(options, scope); end
2319
+
2320
+ # Get target(method_options or class_options) options
2321
+ # of before and after by block evaluation.
2322
+ #
2323
+ # source://thor//lib/thor/base.rb#808
2324
+ def built_option_names(target, opt = T.unsafe(nil), &block); end
2325
+
2326
+ # Prints the class options per group. If an option does not belong to
2327
+ # any group, it's printed as Class option.
2328
+ #
2329
+ # source://thor//lib/thor/base.rb#638
2330
+ def class_options_help(shell, groups = T.unsafe(nil)); end
2331
+
2332
+ # Get command scope member by name.
2333
+ #
2334
+ # source://thor//lib/thor/base.rb#816
2335
+ def command_scope_member(name, options = T.unsafe(nil)); end
2336
+
2337
+ # SIGNATURE: Creates a new command if valid_command? is true. This method is
2338
+ # called when a new method is added to the class.
2339
+ #
2340
+ # source://thor//lib/thor/base.rb#782
2341
+ def create_command(meth); end
2342
+
2343
+ # SIGNATURE: Creates a new command if valid_command? is true. This method is
2344
+ # called when a new method is added to the class.
2345
+ #
2346
+ # source://thor//lib/thor/base.rb#782
2347
+ def create_task(meth); end
2348
+
2349
+ # SIGNATURE: The hook invoked by start.
2350
+ #
2351
+ # @raise [NotImplementedError]
2352
+ #
2353
+ # source://thor//lib/thor/base.rb#792
2354
+ def dispatch(command, given_args, given_opts, config); end
2355
+
2356
+ # Finds a command with the given name. If the command belongs to the current
2357
+ # class, just return it, otherwise dup it and add the fresh copy to the
2358
+ # current command hash.
2359
+ #
2360
+ # source://thor//lib/thor/base.rb#708
2361
+ def find_and_refresh_command(name); end
2362
+
2363
+ # Finds a command with the given name. If the command belongs to the current
2364
+ # class, just return it, otherwise dup it and add the fresh copy to the
2365
+ # current command hash.
2366
+ #
2367
+ # source://thor//lib/thor/base.rb#708
2368
+ def find_and_refresh_task(name); end
2369
+
2370
+ # Retrieves a value from superclass. If it reaches the baseclass,
2371
+ # returns default.
2372
+ #
2373
+ # source://thor//lib/thor/base.rb#749
2374
+ def from_superclass(method, default = T.unsafe(nil)); end
2375
+
2376
+ # Every time someone inherits from a Thor class, register the klass
2377
+ # and file into baseclass.
2378
+ #
2379
+ # source://thor//lib/thor/base.rb#721
2380
+ def inherited(klass); end
2381
+
2382
+ # SIGNATURE: Defines behavior when the initialize method is added to the
2383
+ # class.
2384
+ #
2385
+ # source://thor//lib/thor/base.rb#788
2386
+ def initialize_added; end
2387
+
2388
+ # Raises an error if the word given is a Thor reserved word.
2389
+ #
2390
+ # @return [Boolean]
2391
+ #
2392
+ # source://thor//lib/thor/base.rb#677
2393
+ def is_thor_reserved_word?(word, type); end
2394
+
2395
+ # Fire this callback whenever a method is added. Added methods are
2396
+ # tracked as commands by invoking the create_command method.
2397
+ #
2398
+ # source://thor//lib/thor/base.rb#729
2399
+ def method_added(meth); end
2400
+
2401
+ # Receives a set of options and print them.
2402
+ #
2403
+ # source://thor//lib/thor/base.rb#656
2404
+ def print_options(shell, options, group_name = T.unsafe(nil)); end
2405
+
2406
+ # Register a relation of options for target(method_option/class_option)
2407
+ # by args and block.
2408
+ #
2409
+ # source://thor//lib/thor/base.rb#798
2410
+ def register_options_relation_for(target, relation, *args, &block); end
2411
+ end
2412
+
2413
+ # source://thor//lib/thor/command.rb#2
2414
+ class Thor::Command < ::Struct
2415
+ # @return [Command] a new instance of Command
2416
+ #
2417
+ # source://thor//lib/thor/command.rb#5
2418
+ def initialize(name, description, long_description, wrap_long_description, usage, options = T.unsafe(nil), options_relation = T.unsafe(nil)); end
2419
+
2420
+ # Returns the formatted usage by injecting given required arguments
2421
+ # and required options into the given usage.
2422
+ #
2423
+ # source://thor//lib/thor/command.rb#42
2424
+ def formatted_usage(klass, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end
2425
+
2426
+ # @return [Boolean]
2427
+ #
2428
+ # source://thor//lib/thor/command.rb#15
2429
+ def hidden?; end
2430
+
2431
+ # source://thor//lib/thor/command.rb#70
2432
+ def method_at_least_one_option_names; end
2433
+
2434
+ # source://thor//lib/thor/command.rb#66
2435
+ def method_exclusive_option_names; end
2436
+
2437
+ # By default, a command invokes a method in the thor class. You can change this
2438
+ # implementation to create custom commands.
2439
+ #
2440
+ # source://thor//lib/thor/command.rb#21
2441
+ def run(instance, args = T.unsafe(nil)); end
2442
+
2443
+ protected
2444
+
2445
+ # @return [Boolean]
2446
+ #
2447
+ # source://thor//lib/thor/command.rb#114
2448
+ def handle_argument_error?(instance, error, caller); end
2449
+
2450
+ # @return [Boolean]
2451
+ #
2452
+ # source://thor//lib/thor/command.rb#121
2453
+ def handle_no_method_error?(instance, error, caller); end
2454
+
2455
+ # @return [Boolean]
2456
+ #
2457
+ # source://thor//lib/thor/command.rb#104
2458
+ def local_method?(instance, name); end
2459
+
2460
+ # @return [Boolean]
2461
+ #
2462
+ # source://thor//lib/thor/command.rb#87
2463
+ def not_debugging?(instance); end
2464
+
2465
+ # @return [Boolean]
2466
+ #
2467
+ # source://thor//lib/thor/command.rb#100
2468
+ def private_method?(instance); end
2469
+
2470
+ # Given a target, checks if this class name is a public method.
2471
+ #
2472
+ # @return [Boolean]
2473
+ #
2474
+ # source://thor//lib/thor/command.rb#96
2475
+ def public_method?(instance); end
2476
+
2477
+ # Add usage with required arguments
2478
+ #
2479
+ # source://thor//lib/thor/command.rb#77
2480
+ def required_arguments_for(klass, usage); end
2481
+
2482
+ # source://thor//lib/thor/command.rb#91
2483
+ def required_options; end
2484
+
2485
+ # source://thor//lib/thor/command.rb#109
2486
+ def sans_backtrace(backtrace, caller); end
2487
+
2488
+ private
2489
+
2490
+ # source://thor//lib/thor/command.rb#9
2491
+ def initialize_copy(other); end
2492
+ end
2493
+
2494
+ # source://thor//lib/thor/command.rb#3
2495
+ Thor::Command::FILE_REGEXP = T.let(T.unsafe(nil), Regexp)
2496
+
2497
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#2
2498
+ module Thor::CoreExt; end
2499
+
2500
+ # A hash with indifferent access and magic predicates.
2501
+ #
2502
+ # hash = Thor::CoreExt::HashWithIndifferentAccess.new 'foo' => 'bar', 'baz' => 'bee', 'force' => true
2503
+ #
2504
+ # hash[:foo] #=> 'bar'
2505
+ # hash['foo'] #=> 'bar'
2506
+ # hash.foo? #=> true
2507
+ #
2508
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#11
2509
+ class Thor::CoreExt::HashWithIndifferentAccess < ::Hash
2510
+ # @return [HashWithIndifferentAccess] a new instance of HashWithIndifferentAccess
2511
+ #
2512
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#12
2513
+ def initialize(hash = T.unsafe(nil)); end
2514
+
2515
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#19
2516
+ def [](key); end
2517
+
2518
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#23
2519
+ def []=(key, value); end
2520
+
2521
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#27
2522
+ def delete(key); end
2523
+
2524
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#31
2525
+ def except(*keys); end
2526
+
2527
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#37
2528
+ def fetch(key, *args); end
2529
+
2530
+ # @return [Boolean]
2531
+ #
2532
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#45
2533
+ def key?(key); end
2534
+
2535
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#53
2536
+ def merge(other); end
2537
+
2538
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#57
2539
+ def merge!(other); end
2540
+
2541
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#72
2542
+ def replace(other_hash); end
2543
+
2544
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#64
2545
+ def reverse_merge(other); end
2546
+
2547
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#68
2548
+ def reverse_merge!(other_hash); end
2549
+
2550
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#41
2551
+ def slice(*keys); end
2552
+
2553
+ # Convert to a Hash with String keys.
2554
+ #
2555
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#77
2556
+ def to_hash; end
2557
+
2558
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#49
2559
+ def values_at(*indices); end
2560
+
2561
+ protected
2562
+
2563
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#83
2564
+ def convert_key(key); end
2565
+
2566
+ # Magic predicates. For instance:
2567
+ #
2568
+ # options.force? # => !!options['force']
2569
+ # options.shebang # => "/usr/lib/local/ruby"
2570
+ # options.test_framework?(:rspec) # => options[:test_framework] == :rspec
2571
+ #
2572
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#93
2573
+ def method_missing(method, *args); end
2574
+ end
2575
+
2576
+ # source://thor//lib/thor/error.rb#3
2577
+ module Thor::Correctable
2578
+ # source://thor//lib/thor/error.rb#8
2579
+ def corrections; end
2580
+
2581
+ # source://thor//lib/thor/error.rb#4
2582
+ def to_s; end
2583
+ end
2584
+
2585
+ # A dynamic command that handles method missing scenarios.
2586
+ #
2587
+ # source://thor//lib/thor/command.rb#137
2588
+ class Thor::DynamicCommand < ::Thor::Command
2589
+ # @return [DynamicCommand] a new instance of DynamicCommand
2590
+ #
2591
+ # source://thor//lib/thor/command.rb#138
2592
+ def initialize(name, options = T.unsafe(nil)); end
2593
+
2594
+ # source://thor//lib/thor/command.rb#142
2595
+ def run(instance, args = T.unsafe(nil)); end
2596
+ end
2597
+
2598
+ # source://thor//lib/thor/command.rb#150
2599
+ Thor::DynamicTask = Thor::DynamicCommand
2600
+
2601
+ # Thor::Error is raised when it's caused by wrong usage of thor classes. Those
2602
+ # errors have their backtrace suppressed and are nicely shown to the user.
2603
+ #
2604
+ # Errors that are caused by the developer, like declaring a method which
2605
+ # overwrites a thor keyword, SHOULD NOT raise a Thor::Error. This way, we
2606
+ # ensure that developer errors are shown with full backtrace.
2607
+ #
2608
+ # source://thor//lib/thor/error.rb#20
2609
+ class Thor::Error < ::StandardError; end
2610
+
2611
+ # source://thor//lib/thor/error.rb#101
2612
+ class Thor::ExclusiveArgumentError < ::Thor::InvocationError; end
2613
+
2614
+ # Thor has a special class called Thor::Group. The main difference to Thor class
2615
+ # is that it invokes all commands at once. It also include some methods that allows
2616
+ # invocations to be done at the class method, which are not available to Thor
2617
+ # commands.
2618
+ #
2619
+ # source://thor//lib/thor/group.rb#7
2620
+ class Thor::Group
2621
+ include ::Thor::Base
2622
+ include ::Thor::Invocation
2623
+ include ::Thor::Shell
2624
+ extend ::Thor::Base::ClassMethods
2625
+ extend ::Thor::Invocation::ClassMethods
2626
+
2627
+ protected
2628
+
2629
+ # Shortcut to invoke with padding and block handling. Use internally by
2630
+ # invoke and invoke_from_option class methods.
2631
+ #
2632
+ # source://thor//lib/thor/group.rb#265
2633
+ def _invoke_for_class_method(klass, command = T.unsafe(nil), *args, &block); end
2634
+
2635
+ class << self
2636
+ # Overwrite class options help to allow invoked generators options to be
2637
+ # shown recursively when invoking a generator.
2638
+ #
2639
+ # source://thor//lib/thor/group.rb#161
2640
+ def class_options_help(shell, groups = T.unsafe(nil)); end
2641
+
2642
+ # The description for this Thor::Group. If none is provided, but a source root
2643
+ # exists, tries to find the USAGE one folder above it, otherwise searches
2644
+ # in the superclass.
2645
+ #
2646
+ # ==== Parameters
2647
+ # description<String>:: The description for this Thor::Group.
2648
+ #
2649
+ # source://thor//lib/thor/group.rb#16
2650
+ def desc(description = T.unsafe(nil)); end
2651
+
2652
+ # Get invocations array and merge options from invocations. Those
2653
+ # options are added to group_options hash. Options that already exists
2654
+ # in base_options are not added twice.
2655
+ #
2656
+ # source://thor//lib/thor/group.rb#172
2657
+ def get_options_from_invocations(group_options, base_options); end
2658
+
2659
+ # @raise [error]
2660
+ #
2661
+ # source://thor//lib/thor/group.rb#207
2662
+ def handle_argument_error(command, error, _args, arity); end
2663
+
2664
+ # Prints help information.
2665
+ #
2666
+ # ==== Options
2667
+ # short:: When true, shows only usage.
2668
+ #
2669
+ # source://thor//lib/thor/group.rb#29
2670
+ def help(shell); end
2671
+
2672
+ # Stores invocation blocks used on invoke_from_option.
2673
+ #
2674
+ # source://thor//lib/thor/group.rb#45
2675
+ def invocation_blocks; end
2676
+
2677
+ # Stores invocations for this class merging with superclass values.
2678
+ #
2679
+ # source://thor//lib/thor/group.rb#39
2680
+ def invocations; end
2681
+
2682
+ # Invoke the given namespace or class given. It adds an instance
2683
+ # method that will invoke the klass and command. You can give a block to
2684
+ # configure how it will be invoked.
2685
+ #
2686
+ # The namespace/class given will have its options showed on the help
2687
+ # usage. Check invoke_from_option for more information.
2688
+ #
2689
+ # source://thor//lib/thor/group.rb#56
2690
+ def invoke(*names, &block); end
2691
+
2692
+ # Invoke a thor class based on the value supplied by the user to the
2693
+ # given option named "name". A class option must be created before this
2694
+ # method is invoked for each name given.
2695
+ #
2696
+ # ==== Examples
2697
+ #
2698
+ # class GemGenerator < Thor::Group
2699
+ # class_option :test_framework, :type => :string
2700
+ # invoke_from_option :test_framework
2701
+ # end
2702
+ #
2703
+ # ==== Boolean options
2704
+ #
2705
+ # In some cases, you want to invoke a thor class if some option is true or
2706
+ # false. This is automatically handled by invoke_from_option. Then the
2707
+ # option name is used to invoke the generator.
2708
+ #
2709
+ # ==== Preparing for invocation
2710
+ #
2711
+ # In some cases you want to customize how a specified hook is going to be
2712
+ # invoked. You can do that by overwriting the class method
2713
+ # prepare_for_invocation. The class method must necessarily return a klass
2714
+ # and an optional command.
2715
+ #
2716
+ # ==== Custom invocations
2717
+ #
2718
+ # You can also supply a block to customize how the option is going to be
2719
+ # invoked. The block receives two parameters, an instance of the current
2720
+ # class and the klass to be invoked.
2721
+ #
2722
+ # source://thor//lib/thor/group.rb#110
2723
+ def invoke_from_option(*names, &block); end
2724
+
2725
+ # Returns commands ready to be printed.
2726
+ #
2727
+ # source://thor//lib/thor/group.rb#199
2728
+ def printable_commands(*_arg0); end
2729
+
2730
+ # Returns commands ready to be printed.
2731
+ #
2732
+ # source://thor//lib/thor/group.rb#199
2733
+ def printable_tasks(*_arg0); end
2734
+
2735
+ # Remove a previously added invocation.
2736
+ #
2737
+ # ==== Examples
2738
+ #
2739
+ # remove_invocation :test_framework
2740
+ #
2741
+ # source://thor//lib/thor/group.rb#149
2742
+ def remove_invocation(*names); end
2743
+
2744
+ protected
2745
+
2746
+ # The banner for this class. You can customize it if you are invoking the
2747
+ # thor class by another ways which is not the Thor::Runner.
2748
+ #
2749
+ # source://thor//lib/thor/group.rb#238
2750
+ def banner; end
2751
+
2752
+ # source://thor//lib/thor/group.rb#248
2753
+ def baseclass; end
2754
+
2755
+ # source://thor//lib/thor/group.rb#252
2756
+ def create_command(meth); end
2757
+
2758
+ # source://thor//lib/thor/group.rb#252
2759
+ def create_task(meth); end
2760
+
2761
+ # The method responsible for dispatching given the args.
2762
+ #
2763
+ # @yield [instance]
2764
+ #
2765
+ # source://thor//lib/thor/group.rb#217
2766
+ def dispatch(command, given_args, given_opts, config); end
2767
+
2768
+ # Represents the whole class as a command.
2769
+ #
2770
+ # source://thor//lib/thor/group.rb#243
2771
+ def self_command; end
2772
+
2773
+ # Represents the whole class as a command.
2774
+ #
2775
+ # source://thor//lib/thor/group.rb#243
2776
+ def self_task; end
2777
+ end
2778
+ end
2779
+
2780
+ # Shortcuts for help.
2781
+ #
2782
+ # source://thor//lib/thor/base.rb#17
2783
+ Thor::HELP_MAPPINGS = T.let(T.unsafe(nil), Array)
2784
+
2785
+ # A command that is hidden in help messages but still invocable.
2786
+ #
2787
+ # source://thor//lib/thor/command.rb#129
2788
+ class Thor::HiddenCommand < ::Thor::Command
2789
+ # @return [Boolean]
2790
+ #
2791
+ # source://thor//lib/thor/command.rb#130
2792
+ def hidden?; end
2793
+ end
2794
+
2795
+ # source://thor//lib/thor/command.rb#134
2796
+ Thor::HiddenTask = Thor::HiddenCommand
2797
+
2798
+ # source://thor//lib/thor/invocation.rb#2
2799
+ module Thor::Invocation
2800
+ mixes_in_class_methods ::Thor::Invocation::ClassMethods
2801
+
2802
+ # Make initializer aware of invocations and the initialization args.
2803
+ #
2804
+ # source://thor//lib/thor/invocation.rb#23
2805
+ def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil), &block); end
2806
+
2807
+ # Make the current command chain accessible with in a Thor-(sub)command
2808
+ #
2809
+ # source://thor//lib/thor/invocation.rb#30
2810
+ def current_command_chain; end
2811
+
2812
+ # Receives a name and invokes it. The name can be a string (either "command" or
2813
+ # "namespace:command"), a Thor::Command, a Class or a Thor instance. If the
2814
+ # command cannot be guessed by name, it can also be supplied as second argument.
2815
+ #
2816
+ # You can also supply the arguments, options and configuration values for
2817
+ # the command to be invoked, if none is given, the same values used to
2818
+ # initialize the invoker are used to initialize the invoked.
2819
+ #
2820
+ # When no name is given, it will invoke the default command of the current class.
2821
+ #
2822
+ # ==== Examples
2823
+ #
2824
+ # class A < Thor
2825
+ # def foo
2826
+ # invoke :bar
2827
+ # invoke "b:hello", ["Erik"]
2828
+ # end
2829
+ #
2830
+ # def bar
2831
+ # invoke "b:hello", ["Erik"]
2832
+ # end
2833
+ # end
2834
+ #
2835
+ # class B < Thor
2836
+ # def hello(name)
2837
+ # puts "hello #{name}"
2838
+ # end
2839
+ # end
2840
+ #
2841
+ # You can notice that the method "foo" above invokes two commands: "bar",
2842
+ # which belongs to the same class and "hello" which belongs to the class B.
2843
+ #
2844
+ # By using an invocation system you ensure that a command is invoked only once.
2845
+ # In the example above, invoking "foo" will invoke "b:hello" just once, even
2846
+ # if it's invoked later by "bar" method.
2847
+ #
2848
+ # When class A invokes class B, all arguments used on A initialization are
2849
+ # supplied to B. This allows lazy parse of options. Let's suppose you have
2850
+ # some rspec commands:
2851
+ #
2852
+ # class Rspec < Thor::Group
2853
+ # class_option :mock_framework, :type => :string, :default => :rr
2854
+ #
2855
+ # def invoke_mock_framework
2856
+ # invoke "rspec:#{options[:mock_framework]}"
2857
+ # end
2858
+ # end
2859
+ #
2860
+ # As you noticed, it invokes the given mock framework, which might have its
2861
+ # own options:
2862
+ #
2863
+ # class Rspec::RR < Thor::Group
2864
+ # class_option :style, :type => :string, :default => :mock
2865
+ # end
2866
+ #
2867
+ # Since it's not rspec concern to parse mock framework options, when RR
2868
+ # is invoked all options are parsed again, so RR can extract only the options
2869
+ # that it's going to use.
2870
+ #
2871
+ # If you want Rspec::RR to be initialized with its own set of options, you
2872
+ # have to do that explicitly:
2873
+ #
2874
+ # invoke "rspec:rr", [], :style => :foo
2875
+ #
2876
+ # Besides giving an instance, you can also give a class to invoke:
2877
+ #
2878
+ # invoke Rspec::RR, [], :style => :foo
2879
+ #
2880
+ # source://thor//lib/thor/invocation.rb#102
2881
+ def invoke(name = T.unsafe(nil), *args); end
2882
+
2883
+ # Invoke all commands for the current instance.
2884
+ #
2885
+ # source://thor//lib/thor/invocation.rb#133
2886
+ def invoke_all; end
2887
+
2888
+ # Invoke the given command if the given args.
2889
+ #
2890
+ # source://thor//lib/thor/invocation.rb#122
2891
+ def invoke_command(command, *args); end
2892
+
2893
+ # Invoke the given command if the given args.
2894
+ #
2895
+ # source://thor//lib/thor/invocation.rb#122
2896
+ def invoke_task(command, *args); end
2897
+
2898
+ # Invokes using shell padding.
2899
+ #
2900
+ # source://thor//lib/thor/invocation.rb#138
2901
+ def invoke_with_padding(*args); end
2902
+
2903
+ protected
2904
+
2905
+ # Initialize klass using values stored in the @_initializer.
2906
+ #
2907
+ # source://thor//lib/thor/invocation.rb#166
2908
+ def _parse_initialization_options(args, opts, config); end
2909
+
2910
+ # This method simply retrieves the class and command to be invoked.
2911
+ # If the name is nil or the given name is a command in the current class,
2912
+ # use the given name and return self as class. Otherwise, call
2913
+ # prepare_for_invocation in the current class.
2914
+ #
2915
+ # source://thor//lib/thor/invocation.rb#153
2916
+ def _retrieve_class_and_command(name, sent_command = T.unsafe(nil)); end
2917
+
2918
+ # This method simply retrieves the class and command to be invoked.
2919
+ # If the name is nil or the given name is a command in the current class,
2920
+ # use the given name and return self as class. Otherwise, call
2921
+ # prepare_for_invocation in the current class.
2922
+ #
2923
+ # source://thor//lib/thor/invocation.rb#153
2924
+ def _retrieve_class_and_task(name, sent_command = T.unsafe(nil)); end
2925
+
2926
+ # Configuration values that are shared between invocations.
2927
+ #
2928
+ # source://thor//lib/thor/invocation.rb#145
2929
+ def _shared_configuration; end
2930
+
2931
+ class << self
2932
+ # source://thor//lib/thor/invocation.rb#3
2933
+ def included(base); end
2934
+ end
2935
+ end
2936
+
2937
+ # source://thor//lib/thor/invocation.rb#8
2938
+ module Thor::Invocation::ClassMethods
2939
+ # This method is responsible for receiving a name and find the proper
2940
+ # class and command for it. The key is an optional parameter which is
2941
+ # available only in class methods invocations (i.e. in Thor::Group).
2942
+ #
2943
+ # source://thor//lib/thor/invocation.rb#12
2944
+ def prepare_for_invocation(key, name); end
2945
+ end
2946
+
2947
+ # Raised when a command was found, but not invoked properly.
2948
+ #
2949
+ # source://thor//lib/thor/error.rb#62
2950
+ class Thor::InvocationError < ::Thor::Error; end
2951
+
2952
+ # source://thor//lib/thor/line_editor/basic.rb#2
2953
+ module Thor::LineEditor
2954
+ class << self
2955
+ # source://thor//lib/thor/line_editor.rb#10
2956
+ def best_available; end
2957
+
2958
+ # source://thor//lib/thor/line_editor.rb#6
2959
+ def readline(prompt, options = T.unsafe(nil)); end
2960
+ end
2961
+ end
2962
+
2963
+ # source://thor//lib/thor/line_editor/basic.rb#3
2964
+ class Thor::LineEditor::Basic
2965
+ # @return [Basic] a new instance of Basic
2966
+ #
2967
+ # source://thor//lib/thor/line_editor/basic.rb#10
2968
+ def initialize(prompt, options); end
2969
+
2970
+ # Returns the value of attribute options.
2971
+ #
2972
+ # source://thor//lib/thor/line_editor/basic.rb#4
2973
+ def options; end
2974
+
2975
+ # Returns the value of attribute prompt.
2976
+ #
2977
+ # source://thor//lib/thor/line_editor/basic.rb#4
2978
+ def prompt; end
2979
+
2980
+ # source://thor//lib/thor/line_editor/basic.rb#15
2981
+ def readline; end
2982
+
2983
+ private
2984
+
2985
+ # @return [Boolean]
2986
+ #
2987
+ # source://thor//lib/thor/line_editor/basic.rb#32
2988
+ def echo?; end
2989
+
2990
+ # source://thor//lib/thor/line_editor/basic.rb#22
2991
+ def get_input; end
2992
+
2993
+ class << self
2994
+ # @return [Boolean]
2995
+ #
2996
+ # source://thor//lib/thor/line_editor/basic.rb#6
2997
+ def available?; end
2998
+ end
2999
+ end
3000
+
3001
+ # source://thor//lib/thor/line_editor/readline.rb#3
3002
+ class Thor::LineEditor::Readline < ::Thor::LineEditor::Basic
3003
+ # source://thor//lib/thor/line_editor/readline.rb#13
3004
+ def readline; end
3005
+
3006
+ private
3007
+
3008
+ # @return [Boolean]
3009
+ #
3010
+ # source://thor//lib/thor/line_editor/readline.rb#28
3011
+ def add_to_history?; end
3012
+
3013
+ # source://thor//lib/thor/line_editor/readline.rb#42
3014
+ def completion_options; end
3015
+
3016
+ # source://thor//lib/thor/line_editor/readline.rb#32
3017
+ def completion_proc; end
3018
+
3019
+ # @return [Boolean]
3020
+ #
3021
+ # source://thor//lib/thor/line_editor/readline.rb#46
3022
+ def use_path_completion?; end
3023
+
3024
+ class << self
3025
+ # @return [Boolean]
3026
+ #
3027
+ # source://thor//lib/thor/line_editor/readline.rb#4
3028
+ def available?; end
3029
+ end
3030
+ end
3031
+
3032
+ # source://thor//lib/thor/line_editor/readline.rb#50
3033
+ class Thor::LineEditor::Readline::PathCompletion
3034
+ # @return [PathCompletion] a new instance of PathCompletion
3035
+ #
3036
+ # source://thor//lib/thor/line_editor/readline.rb#54
3037
+ def initialize(text); end
3038
+
3039
+ # source://thor//lib/thor/line_editor/readline.rb#58
3040
+ def matches; end
3041
+
3042
+ private
3043
+
3044
+ # source://thor//lib/thor/line_editor/readline.rb#68
3045
+ def absolute_matches; end
3046
+
3047
+ # source://thor//lib/thor/line_editor/readline.rb#82
3048
+ def base_path; end
3049
+
3050
+ # source://thor//lib/thor/line_editor/readline.rb#78
3051
+ def glob_pattern; end
3052
+
3053
+ # source://thor//lib/thor/line_editor/readline.rb#64
3054
+ def relative_matches; end
3055
+
3056
+ # Returns the value of attribute text.
3057
+ #
3058
+ # source://thor//lib/thor/line_editor/readline.rb#51
3059
+ def text; end
3060
+ end
3061
+
3062
+ # source://thor//lib/thor/error.rb#98
3063
+ class Thor::MalformattedArgumentError < ::Thor::InvocationError; end
3064
+
3065
+ # source://thor//lib/thor/nested_context.rb#2
3066
+ class Thor::NestedContext
3067
+ # @return [NestedContext] a new instance of NestedContext
3068
+ #
3069
+ # source://thor//lib/thor/nested_context.rb#3
3070
+ def initialize; end
3071
+
3072
+ # source://thor//lib/thor/nested_context.rb#7
3073
+ def enter; end
3074
+
3075
+ # @return [Boolean]
3076
+ #
3077
+ # source://thor//lib/thor/nested_context.rb#15
3078
+ def entered?; end
3079
+
3080
+ private
3081
+
3082
+ # source://thor//lib/thor/nested_context.rb#25
3083
+ def pop; end
3084
+
3085
+ # source://thor//lib/thor/nested_context.rb#21
3086
+ def push; end
3087
+ end
3088
+
3089
+ # source://thor//lib/thor/parser/option.rb#2
3090
+ class Thor::Option < ::Thor::Argument
3091
+ # @return [Option] a new instance of Option
3092
+ #
3093
+ # source://thor//lib/thor/parser/option.rb#7
3094
+ def initialize(name, options = T.unsafe(nil)); end
3095
+
3096
+ # Returns the value of attribute aliases.
3097
+ #
3098
+ # source://thor//lib/thor/parser/option.rb#3
3099
+ def aliases; end
3100
+
3101
+ # source://thor//lib/thor/parser/option.rb#99
3102
+ def aliases_for_usage; end
3103
+
3104
+ # source://thor//lib/thor/parser/option.rb#118
3105
+ def array?; end
3106
+
3107
+ # source://thor//lib/thor/parser/option.rb#118
3108
+ def boolean?; end
3109
+
3110
+ # Returns the value of attribute group.
3111
+ #
3112
+ # source://thor//lib/thor/parser/option.rb#3
3113
+ def group; end
3114
+
3115
+ # source://thor//lib/thor/parser/option.rb#118
3116
+ def hash?; end
3117
+
3118
+ # Returns the value of attribute hide.
3119
+ #
3120
+ # source://thor//lib/thor/parser/option.rb#3
3121
+ def hide; end
3122
+
3123
+ # source://thor//lib/thor/parser/option.rb#79
3124
+ def human_name; end
3125
+
3126
+ # Returns the value of attribute lazy_default.
3127
+ #
3128
+ # source://thor//lib/thor/parser/option.rb#3
3129
+ def lazy_default; end
3130
+
3131
+ # source://thor//lib/thor/parser/option.rb#118
3132
+ def numeric?; end
3133
+
3134
+ # Returns the value of attribute repeatable.
3135
+ #
3136
+ # source://thor//lib/thor/parser/option.rb#3
3137
+ def repeatable; end
3138
+
3139
+ # @return [Boolean]
3140
+ #
3141
+ # source://thor//lib/thor/parser/option.rb#107
3142
+ def show_default?; end
3143
+
3144
+ # source://thor//lib/thor/parser/option.rb#118
3145
+ def string?; end
3146
+
3147
+ # source://thor//lib/thor/parser/option.rb#75
3148
+ def switch_name; end
3149
+
3150
+ # source://thor//lib/thor/parser/option.rb#83
3151
+ def usage(padding = T.unsafe(nil)); end
3152
+
3153
+ protected
3154
+
3155
+ # source://thor//lib/thor/parser/option.rb#168
3156
+ def dasherize(str); end
3157
+
3158
+ # @return [Boolean]
3159
+ #
3160
+ # source://thor//lib/thor/parser/option.rb#160
3161
+ def dasherized?; end
3162
+
3163
+ # source://thor//lib/thor/parser/option.rb#164
3164
+ def undasherize(str); end
3165
+
3166
+ # @raise [ArgumentError]
3167
+ #
3168
+ # source://thor//lib/thor/parser/option.rb#126
3169
+ def validate!; end
3170
+
3171
+ # source://thor//lib/thor/parser/option.rb#131
3172
+ def validate_default_type!; end
3173
+
3174
+ private
3175
+
3176
+ # source://thor//lib/thor/parser/option.rb#174
3177
+ def normalize_aliases(aliases); end
3178
+
3179
+ class << self
3180
+ # This parse quick options given as method_options. It makes several
3181
+ # assumptions, but you can be more specific using the option method.
3182
+ #
3183
+ # parse :foo => "bar"
3184
+ # #=> Option foo with default value bar
3185
+ #
3186
+ # parse [:foo, :baz] => "bar"
3187
+ # #=> Option foo with default value bar and alias :baz
3188
+ #
3189
+ # parse :foo => :required
3190
+ # #=> Required option foo without default value
3191
+ #
3192
+ # parse :foo => 2
3193
+ # #=> Option foo with default value 2 and type numeric
3194
+ #
3195
+ # parse :foo => :numeric
3196
+ # #=> Option foo without default value and type numeric
3197
+ #
3198
+ # parse :foo => true
3199
+ # #=> Option foo with default value true and type boolean
3200
+ #
3201
+ # The valid types are :boolean, :numeric, :hash, :array and :string. If none
3202
+ # is given a default type is assumed. This default type accepts arguments as
3203
+ # string (--foo=value) or booleans (just --foo).
3204
+ #
3205
+ # By default all options are optional, unless :required is given.
3206
+ #
3207
+ # source://thor//lib/thor/parser/option.rb#45
3208
+ def parse(key, value); end
3209
+ end
3210
+ end
3211
+
3212
+ # source://thor//lib/thor/parser/option.rb#5
3213
+ Thor::Option::VALID_TYPES = T.let(T.unsafe(nil), Array)
3214
+
3215
+ # source://thor//lib/thor/parser/options.rb#2
3216
+ class Thor::Options < ::Thor::Arguments
3217
+ # Takes a hash of Thor::Option and a hash with defaults.
3218
+ #
3219
+ # If +stop_on_unknown+ is true, #parse will stop as soon as it encounters
3220
+ # an unknown option or a regular argument.
3221
+ #
3222
+ # @return [Options] a new instance of Options
3223
+ #
3224
+ # source://thor//lib/thor/parser/options.rb#32
3225
+ def initialize(hash_options = T.unsafe(nil), defaults = T.unsafe(nil), stop_on_unknown = T.unsafe(nil), disable_required_check = T.unsafe(nil), relations = T.unsafe(nil)); end
3226
+
3227
+ # source://thor//lib/thor/parser/options.rb#156
3228
+ def check_at_least_one!; end
3229
+
3230
+ # source://thor//lib/thor/parser/options.rb#144
3231
+ def check_exclusive!; end
3232
+
3233
+ # @raise [UnknownArgumentError]
3234
+ #
3235
+ # source://thor//lib/thor/parser/options.rb#168
3236
+ def check_unknown!; end
3237
+
3238
+ # source://thor//lib/thor/parser/options.rb#89
3239
+ def parse(args); end
3240
+
3241
+ # source://thor//lib/thor/parser/options.rb#65
3242
+ def peek; end
3243
+
3244
+ # source://thor//lib/thor/parser/options.rb#61
3245
+ def remaining; end
3246
+
3247
+ # source://thor//lib/thor/parser/options.rb#79
3248
+ def shift; end
3249
+
3250
+ # source://thor//lib/thor/parser/options.rb#84
3251
+ def unshift(arg, is_value: T.unsafe(nil)); end
3252
+
3253
+ protected
3254
+
3255
+ # source://thor//lib/thor/parser/options.rb#189
3256
+ def assign_result!(option, result); end
3257
+
3258
+ # Check if the current value in peek is a registered switch.
3259
+ #
3260
+ # Two booleans are returned. The first is true if the current value
3261
+ # starts with a hyphen; the second is true if it is a registered switch.
3262
+ #
3263
+ # @return [Boolean]
3264
+ #
3265
+ # source://thor//lib/thor/parser/options.rb#203
3266
+ def current_is_switch?; end
3267
+
3268
+ # @return [Boolean]
3269
+ #
3270
+ # source://thor//lib/thor/parser/options.rb#215
3271
+ def current_is_switch_formatted?; end
3272
+
3273
+ # @return [Boolean]
3274
+ #
3275
+ # source://thor//lib/thor/parser/options.rb#225
3276
+ def current_is_value?; end
3277
+
3278
+ # Option names changes to swith name or human name
3279
+ #
3280
+ # source://thor//lib/thor/parser/options.rb#179
3281
+ def names_to_switch_names(names = T.unsafe(nil)); end
3282
+
3283
+ # Check if the given argument is actually a shortcut.
3284
+ #
3285
+ # source://thor//lib/thor/parser/options.rb#244
3286
+ def normalize_switch(arg); end
3287
+
3288
+ # Parse boolean values which can be given as --foo=true or --foo for true values, or
3289
+ # --foo=false, --no-foo or --skip-foo for false values.
3290
+ #
3291
+ # source://thor//lib/thor/parser/options.rb#256
3292
+ def parse_boolean(switch); end
3293
+
3294
+ # Parse the value at the peek analyzing if it requires an input or not.
3295
+ #
3296
+ # source://thor//lib/thor/parser/options.rb#274
3297
+ def parse_peek(switch, option); end
3298
+
3299
+ # @return [Boolean]
3300
+ #
3301
+ # source://thor//lib/thor/parser/options.rb#248
3302
+ def parsing_options?; end
3303
+
3304
+ # @return [Boolean]
3305
+ #
3306
+ # source://thor//lib/thor/parser/options.rb#230
3307
+ def switch?(arg); end
3308
+
3309
+ # source://thor//lib/thor/parser/options.rb#234
3310
+ def switch_option(arg); end
3311
+
3312
+ class << self
3313
+ # Receives a hash and makes it switches.
3314
+ #
3315
+ # source://thor//lib/thor/parser/options.rb#11
3316
+ def to_switches(options); end
3317
+ end
3318
+ end
3319
+
3320
+ # source://thor//lib/thor/parser/options.rb#5
3321
+ Thor::Options::EQ_RE = T.let(T.unsafe(nil), Regexp)
3322
+
3323
+ # source://thor//lib/thor/parser/options.rb#3
3324
+ Thor::Options::LONG_RE = T.let(T.unsafe(nil), Regexp)
3325
+
3326
+ # source://thor//lib/thor/parser/options.rb#8
3327
+ Thor::Options::OPTS_END = T.let(T.unsafe(nil), String)
3328
+
3329
+ # source://thor//lib/thor/parser/options.rb#7
3330
+ Thor::Options::SHORT_NUM = T.let(T.unsafe(nil), Regexp)
3331
+
3332
+ # source://thor//lib/thor/parser/options.rb#4
3333
+ Thor::Options::SHORT_RE = T.let(T.unsafe(nil), Regexp)
3334
+
3335
+ # Allow either -x -v or -xv style for single char args
3336
+ #
3337
+ # source://thor//lib/thor/parser/options.rb#6
3338
+ Thor::Options::SHORT_SQ_RE = T.let(T.unsafe(nil), Regexp)
3339
+
3340
+ # source://thor//lib/thor/error.rb#95
3341
+ class Thor::RequiredArgumentMissingError < ::Thor::InvocationError; end
3342
+
3343
+ # source://thor//lib/thor/util.rb#4
3344
+ module Thor::Sandbox; end
3345
+
3346
+ # source://thor//lib/thor/shell.rb#23
3347
+ module Thor::Shell
3348
+ # Add shell to initialize config values.
3349
+ #
3350
+ # ==== Configuration
3351
+ # shell<Object>:: An instance of the shell to be used.
3352
+ #
3353
+ # ==== Examples
3354
+ #
3355
+ # class MyScript < Thor
3356
+ # argument :first, :type => :numeric
3357
+ # end
3358
+ #
3359
+ # MyScript.new [1.0], { :foo => :bar }, :shell => Thor::Shell::Basic.new
3360
+ #
3361
+ # source://thor//lib/thor/shell.rb#44
3362
+ def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end
3363
+
3364
+ # source://thor//lib/thor/shell.rb#59
3365
+ def ask(*args, &block); end
3366
+
3367
+ # source://thor//lib/thor/shell.rb#59
3368
+ def error(*args, &block); end
3369
+
3370
+ # source://thor//lib/thor/shell.rb#59
3371
+ def file_collision(*args, &block); end
3372
+
3373
+ # source://thor//lib/thor/shell.rb#59
3374
+ def no?(*args, &block); end
3375
+
3376
+ # source://thor//lib/thor/shell.rb#59
3377
+ def print_in_columns(*args, &block); end
3378
+
3379
+ # source://thor//lib/thor/shell.rb#59
3380
+ def print_table(*args, &block); end
3381
+
3382
+ # source://thor//lib/thor/shell.rb#59
3383
+ def print_wrapped(*args, &block); end
3384
+
3385
+ # source://thor//lib/thor/shell.rb#59
3386
+ def say(*args, &block); end
3387
+
3388
+ # source://thor//lib/thor/shell.rb#59
3389
+ def say_error(*args, &block); end
3390
+
3391
+ # source://thor//lib/thor/shell.rb#59
3392
+ def say_status(*args, &block); end
3393
+
3394
+ # source://thor//lib/thor/shell.rb#59
3395
+ def set_color(*args, &block); end
3396
+
3397
+ # Holds the shell for the given Thor instance. If no shell is given,
3398
+ # it gets a default shell from Thor::Base.shell.
3399
+ #
3400
+ # source://thor//lib/thor/shell.rb#52
3401
+ def shell; end
3402
+
3403
+ # Sets the attribute shell
3404
+ #
3405
+ # @param value the value to set the attribute shell to.
3406
+ #
3407
+ # source://thor//lib/thor/shell.rb#25
3408
+ def shell=(_arg0); end
3409
+
3410
+ # source://thor//lib/thor/shell.rb#59
3411
+ def terminal_width(*args, &block); end
3412
+
3413
+ # Yields the given block with padding.
3414
+ #
3415
+ # source://thor//lib/thor/shell.rb#66
3416
+ def with_padding; end
3417
+
3418
+ # source://thor//lib/thor/shell.rb#59
3419
+ def yes?(*args, &block); end
3420
+
3421
+ protected
3422
+
3423
+ # Allow shell to be shared between invocations.
3424
+ #
3425
+ # source://thor//lib/thor/shell.rb#77
3426
+ def _shared_configuration; end
3427
+ end
3428
+
3429
+ # source://thor//lib/thor/shell/basic.rb#7
3430
+ class Thor::Shell::Basic
3431
+ # Initialize base, mute and padding to nil.
3432
+ #
3433
+ # @return [Basic] a new instance of Basic
3434
+ #
3435
+ # source://thor//lib/thor/shell/basic.rb#13
3436
+ def initialize; end
3437
+
3438
+ # Asks something to the user and receives a response.
3439
+ #
3440
+ # If a default value is specified it will be presented to the user
3441
+ # and allows them to select that value with an empty response. This
3442
+ # option is ignored when limited answers are supplied.
3443
+ #
3444
+ # If asked to limit the correct responses, you can pass in an
3445
+ # array of acceptable answers. If one of those is not supplied,
3446
+ # they will be shown a message stating that one of those answers
3447
+ # must be given and re-asked the question.
3448
+ #
3449
+ # If asking for sensitive information, the :echo option can be set
3450
+ # to false to mask user input from $stdin.
3451
+ #
3452
+ # If the required input is a path, then set the path option to
3453
+ # true. This will enable tab completion for file paths relative
3454
+ # to the current working directory on systems that support
3455
+ # Readline.
3456
+ #
3457
+ # ==== Example
3458
+ # ask("What is your name?")
3459
+ #
3460
+ # ask("What is the planet furthest from the sun?", :default => "Neptune")
3461
+ #
3462
+ # ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"])
3463
+ #
3464
+ # ask("What is your password?", :echo => false)
3465
+ #
3466
+ # ask("Where should the file be saved?", :path => true)
3467
+ #
3468
+ # source://thor//lib/thor/shell/basic.rb#80
3469
+ def ask(statement, *args); end
3470
+
3471
+ # Returns the value of attribute base.
3472
+ #
3473
+ # source://thor//lib/thor/shell/basic.rb#8
3474
+ def base; end
3475
+
3476
+ # Sets the attribute base
3477
+ #
3478
+ # @param value the value to set the attribute base to.
3479
+ #
3480
+ # source://thor//lib/thor/shell/basic.rb#8
3481
+ def base=(_arg0); end
3482
+
3483
+ # Called if something goes wrong during the execution. This is used by Thor
3484
+ # internally and should not be used inside your scripts. If something went
3485
+ # wrong, you can always raise an exception. If you raise a Thor::Error, it
3486
+ # will be rescued and wrapped in the method below.
3487
+ #
3488
+ # source://thor//lib/thor/shell/basic.rb#251
3489
+ def error(statement); end
3490
+
3491
+ # Deals with file collision and returns true if the file should be
3492
+ # overwritten and false otherwise. If a block is given, it uses the block
3493
+ # response as the content for the diff.
3494
+ #
3495
+ # ==== Parameters
3496
+ # destination<String>:: the destination file to solve conflicts
3497
+ # block<Proc>:: an optional block that returns the value to be used in diff and merge
3498
+ #
3499
+ # source://thor//lib/thor/shell/basic.rb#207
3500
+ def file_collision(destination); end
3501
+
3502
+ # Sets the output padding while executing a block and resets it.
3503
+ #
3504
+ # source://thor//lib/thor/shell/basic.rb#43
3505
+ def indent(count = T.unsafe(nil)); end
3506
+
3507
+ # Mute everything that's inside given block
3508
+ #
3509
+ # source://thor//lib/thor/shell/basic.rb#22
3510
+ def mute; end
3511
+
3512
+ # Check if base is muted
3513
+ #
3514
+ # @return [Boolean]
3515
+ #
3516
+ # source://thor//lib/thor/shell/basic.rb#31
3517
+ def mute?; end
3518
+
3519
+ # Asks the user a question and returns true if the user replies "n" or
3520
+ # "no".
3521
+ #
3522
+ # @return [Boolean]
3523
+ #
3524
+ # source://thor//lib/thor/shell/basic.rb#156
3525
+ def no?(statement, color = T.unsafe(nil)); end
3526
+
3527
+ # Returns the value of attribute padding.
3528
+ #
3529
+ # source://thor//lib/thor/shell/basic.rb#9
3530
+ def padding; end
3531
+
3532
+ # Sets the output padding, not allowing less than zero values.
3533
+ #
3534
+ # source://thor//lib/thor/shell/basic.rb#37
3535
+ def padding=(value); end
3536
+
3537
+ # Prints values in columns
3538
+ #
3539
+ # ==== Parameters
3540
+ # Array[String, String, ...]
3541
+ #
3542
+ # source://thor//lib/thor/shell/basic.rb#165
3543
+ def print_in_columns(array); end
3544
+
3545
+ # Prints a table.
3546
+ #
3547
+ # ==== Parameters
3548
+ # Array[Array[String, String, ...]]
3549
+ #
3550
+ # ==== Options
3551
+ # indent<Integer>:: Indent the first column by indent value.
3552
+ # colwidth<Integer>:: Force the first column to colwidth spaces wide.
3553
+ # borders<Boolean>:: Adds ascii borders.
3554
+ #
3555
+ # source://thor//lib/thor/shell/basic.rb#180
3556
+ def print_table(array, options = T.unsafe(nil)); end
3557
+
3558
+ # Prints a long string, word-wrapping the text to the current width of the
3559
+ # terminal display. Ideal for printing heredocs.
3560
+ #
3561
+ # ==== Parameters
3562
+ # String
3563
+ #
3564
+ # ==== Options
3565
+ # indent<Integer>:: Indent each line of the printed paragraph by indent value.
3566
+ #
3567
+ # source://thor//lib/thor/shell/basic.rb#194
3568
+ def print_wrapped(message, options = T.unsafe(nil)); end
3569
+
3570
+ # Say (print) something to the user. If the sentence ends with a whitespace
3571
+ # or tab character, a new line is not appended (print + flush). Otherwise
3572
+ # are passed straight to puts (behavior got from Highline).
3573
+ #
3574
+ # ==== Example
3575
+ # say("I know you knew that.")
3576
+ #
3577
+ # source://thor//lib/thor/shell/basic.rb#98
3578
+ def say(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end
3579
+
3580
+ # Say (print) an error to the user. If the sentence ends with a whitespace
3581
+ # or tab character, a new line is not appended (print + flush). Otherwise
3582
+ # are passed straight to puts (behavior got from Highline).
3583
+ #
3584
+ # ==== Example
3585
+ # say_error("error: something went wrong")
3586
+ #
3587
+ # source://thor//lib/thor/shell/basic.rb#115
3588
+ def say_error(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end
3589
+
3590
+ # Say a status with the given color and appends the message. Since this
3591
+ # method is used frequently by actions, it allows nil or false to be given
3592
+ # in log_status, avoiding the message from being shown. If a Symbol is
3593
+ # given in log_status, it's used as the color.
3594
+ #
3595
+ # source://thor//lib/thor/shell/basic.rb#130
3596
+ def say_status(status, message, log_status = T.unsafe(nil)); end
3597
+
3598
+ # Apply color to the given string with optional bold. Disabled in the
3599
+ # Thor::Shell::Basic class.
3600
+ #
3601
+ # source://thor//lib/thor/shell/basic.rb#258
3602
+ def set_color(string, *_arg1); end
3603
+
3604
+ # Asks the user a question and returns true if the user replies "y" or
3605
+ # "yes".
3606
+ #
3607
+ # @return [Boolean]
3608
+ #
3609
+ # source://thor//lib/thor/shell/basic.rb#149
3610
+ def yes?(statement, color = T.unsafe(nil)); end
3611
+
3612
+ protected
3613
+
3614
+ # source://thor//lib/thor/shell/basic.rb#362
3615
+ def answer_match(possibilities, answer, case_insensitive); end
3616
+
3617
+ # source://thor//lib/thor/shell/basic.rb#349
3618
+ def ask_filtered(statement, color, options); end
3619
+
3620
+ # source://thor//lib/thor/shell/basic.rb#332
3621
+ def ask_simply(statement, color, options); end
3622
+
3623
+ # @return [Boolean]
3624
+ #
3625
+ # source://thor//lib/thor/shell/basic.rb#269
3626
+ def can_display_colors?; end
3627
+
3628
+ # source://thor//lib/thor/shell/basic.rb#296
3629
+ def file_collision_help(block_given); end
3630
+
3631
+ # source://thor//lib/thor/shell/basic.rb#383
3632
+ def git_merge_tool; end
3633
+
3634
+ # @return [Boolean]
3635
+ #
3636
+ # source://thor//lib/thor/shell/basic.rb#286
3637
+ def is?(value); end
3638
+
3639
+ # source://thor//lib/thor/shell/basic.rb#273
3640
+ def lookup_color(color); end
3641
+
3642
+ # source://thor//lib/thor/shell/basic.rb#370
3643
+ def merge(destination, content); end
3644
+
3645
+ # source://thor//lib/thor/shell/basic.rb#379
3646
+ def merge_tool; end
3647
+
3648
+ # source://thor//lib/thor/shell/basic.rb#264
3649
+ def prepare_message(message, *color); end
3650
+
3651
+ # @return [Boolean]
3652
+ #
3653
+ # source://thor//lib/thor/shell/basic.rb#324
3654
+ def quiet?; end
3655
+
3656
+ # source://thor//lib/thor/shell/basic.rb#313
3657
+ def show_diff(destination, content); end
3658
+
3659
+ # source://thor//lib/thor/shell/basic.rb#282
3660
+ def stderr; end
3661
+
3662
+ # source://thor//lib/thor/shell/basic.rb#278
3663
+ def stdout; end
3664
+
3665
+ # @return [Boolean]
3666
+ #
3667
+ # source://thor//lib/thor/shell/basic.rb#328
3668
+ def unix?; end
3669
+ end
3670
+
3671
+ # Inherit from Thor::Shell::Basic and add set_color behavior. Check
3672
+ # Thor::Shell::Basic to see all available methods.
3673
+ #
3674
+ # source://thor//lib/thor/shell/color.rb#9
3675
+ class Thor::Shell::Color < ::Thor::Shell::Basic
3676
+ include ::LCSDiff
3677
+
3678
+ # Set color by using a string or one of the defined constants. If a third
3679
+ # option is set to true, it also adds bold to the string. This is based
3680
+ # on Highline implementation and it automatically appends CLEAR to the end
3681
+ # of the returned String.
3682
+ #
3683
+ # Pass foreground, background and bold options to this method as
3684
+ # symbols.
3685
+ #
3686
+ # Example:
3687
+ #
3688
+ # set_color "Hi!", :red, :on_white, :bold
3689
+ #
3690
+ # The available colors are:
3691
+ #
3692
+ # :bold
3693
+ # :black
3694
+ # :red
3695
+ # :green
3696
+ # :yellow
3697
+ # :blue
3698
+ # :magenta
3699
+ # :cyan
3700
+ # :white
3701
+ # :on_black
3702
+ # :on_red
3703
+ # :on_green
3704
+ # :on_yellow
3705
+ # :on_blue
3706
+ # :on_magenta
3707
+ # :on_cyan
3708
+ # :on_white
3709
+ #
3710
+ # source://thor//lib/thor/shell/color.rb#82
3711
+ def set_color(string, *colors); end
3712
+
3713
+ protected
3714
+
3715
+ # @return [Boolean]
3716
+ #
3717
+ # source://thor//lib/thor/shell/color.rb#110
3718
+ def are_colors_disabled?; end
3719
+
3720
+ # @return [Boolean]
3721
+ #
3722
+ # source://thor//lib/thor/shell/color.rb#106
3723
+ def are_colors_supported?; end
3724
+
3725
+ # @return [Boolean]
3726
+ #
3727
+ # source://thor//lib/thor/shell/color.rb#102
3728
+ def can_display_colors?; end
3729
+ end
3730
+
3731
+ # Set the terminal's foreground ANSI color to black.
3732
+ #
3733
+ # source://thor//lib/thor/shell/color.rb#18
3734
+ Thor::Shell::Color::BLACK = T.let(T.unsafe(nil), String)
3735
+
3736
+ # Set the terminal's foreground ANSI color to blue.
3737
+ #
3738
+ # source://thor//lib/thor/shell/color.rb#26
3739
+ Thor::Shell::Color::BLUE = T.let(T.unsafe(nil), String)
3740
+
3741
+ # The start of an ANSI bold sequence.
3742
+ #
3743
+ # source://thor//lib/thor/shell/color.rb#15
3744
+ Thor::Shell::Color::BOLD = T.let(T.unsafe(nil), String)
3745
+
3746
+ # Embed in a String to clear all previous ANSI sequences.
3747
+ #
3748
+ # source://thor//lib/thor/shell/color.rb#13
3749
+ Thor::Shell::Color::CLEAR = T.let(T.unsafe(nil), String)
3750
+
3751
+ # Set the terminal's foreground ANSI color to cyan.
3752
+ #
3753
+ # source://thor//lib/thor/shell/color.rb#30
3754
+ Thor::Shell::Color::CYAN = T.let(T.unsafe(nil), String)
3755
+
3756
+ # Set the terminal's foreground ANSI color to green.
3757
+ #
3758
+ # source://thor//lib/thor/shell/color.rb#22
3759
+ Thor::Shell::Color::GREEN = T.let(T.unsafe(nil), String)
3760
+
3761
+ # Set the terminal's foreground ANSI color to magenta.
3762
+ #
3763
+ # source://thor//lib/thor/shell/color.rb#28
3764
+ Thor::Shell::Color::MAGENTA = T.let(T.unsafe(nil), String)
3765
+
3766
+ # Set the terminal's background ANSI color to black.
3767
+ #
3768
+ # source://thor//lib/thor/shell/color.rb#35
3769
+ Thor::Shell::Color::ON_BLACK = T.let(T.unsafe(nil), String)
3770
+
3771
+ # Set the terminal's background ANSI color to blue.
3772
+ #
3773
+ # source://thor//lib/thor/shell/color.rb#43
3774
+ Thor::Shell::Color::ON_BLUE = T.let(T.unsafe(nil), String)
3775
+
3776
+ # Set the terminal's background ANSI color to cyan.
3777
+ #
3778
+ # source://thor//lib/thor/shell/color.rb#47
3779
+ Thor::Shell::Color::ON_CYAN = T.let(T.unsafe(nil), String)
3780
+
3781
+ # Set the terminal's background ANSI color to green.
3782
+ #
3783
+ # source://thor//lib/thor/shell/color.rb#39
3784
+ Thor::Shell::Color::ON_GREEN = T.let(T.unsafe(nil), String)
3785
+
3786
+ # Set the terminal's background ANSI color to magenta.
3787
+ #
3788
+ # source://thor//lib/thor/shell/color.rb#45
3789
+ Thor::Shell::Color::ON_MAGENTA = T.let(T.unsafe(nil), String)
3790
+
3791
+ # Set the terminal's background ANSI color to red.
3792
+ #
3793
+ # source://thor//lib/thor/shell/color.rb#37
3794
+ Thor::Shell::Color::ON_RED = T.let(T.unsafe(nil), String)
3795
+
3796
+ # Set the terminal's background ANSI color to white.
3797
+ #
3798
+ # source://thor//lib/thor/shell/color.rb#49
3799
+ Thor::Shell::Color::ON_WHITE = T.let(T.unsafe(nil), String)
3800
+
3801
+ # Set the terminal's background ANSI color to yellow.
3802
+ #
3803
+ # source://thor//lib/thor/shell/color.rb#41
3804
+ Thor::Shell::Color::ON_YELLOW = T.let(T.unsafe(nil), String)
3805
+
3806
+ # Set the terminal's foreground ANSI color to red.
3807
+ #
3808
+ # source://thor//lib/thor/shell/color.rb#20
3809
+ Thor::Shell::Color::RED = T.let(T.unsafe(nil), String)
3810
+
3811
+ # Set the terminal's foreground ANSI color to white.
3812
+ #
3813
+ # source://thor//lib/thor/shell/color.rb#32
3814
+ Thor::Shell::Color::WHITE = T.let(T.unsafe(nil), String)
3815
+
3816
+ # Set the terminal's foreground ANSI color to yellow.
3817
+ #
3818
+ # source://thor//lib/thor/shell/color.rb#24
3819
+ Thor::Shell::Color::YELLOW = T.let(T.unsafe(nil), String)
3820
+
3821
+ # source://thor//lib/thor/shell/column_printer.rb#5
3822
+ class Thor::Shell::ColumnPrinter
3823
+ # @return [ColumnPrinter] a new instance of ColumnPrinter
3824
+ #
3825
+ # source://thor//lib/thor/shell/column_printer.rb#8
3826
+ def initialize(stdout, options = T.unsafe(nil)); end
3827
+
3828
+ # Returns the value of attribute options.
3829
+ #
3830
+ # source://thor//lib/thor/shell/column_printer.rb#6
3831
+ def options; end
3832
+
3833
+ # source://thor//lib/thor/shell/column_printer.rb#14
3834
+ def print(array); end
3835
+
3836
+ # Returns the value of attribute stdout.
3837
+ #
3838
+ # source://thor//lib/thor/shell/column_printer.rb#6
3839
+ def stdout; end
3840
+ end
3841
+
3842
+ # Inherit from Thor::Shell::Basic and add set_color behavior. Check
3843
+ # Thor::Shell::Basic to see all available methods.
3844
+ #
3845
+ # source://thor//lib/thor/shell/html.rb#9
3846
+ class Thor::Shell::HTML < ::Thor::Shell::Basic
3847
+ include ::LCSDiff
3848
+
3849
+ # Ask something to the user and receives a response.
3850
+ #
3851
+ # ==== Example
3852
+ # ask("What is your name?")
3853
+ #
3854
+ # TODO: Implement #ask for Thor::Shell::HTML
3855
+ #
3856
+ # @raise [NotImplementedError]
3857
+ #
3858
+ # source://thor//lib/thor/shell/html.rb#73
3859
+ def ask(statement, color = T.unsafe(nil)); end
3860
+
3861
+ # Set color by using a string or one of the defined constants. If a third
3862
+ # option is set to true, it also adds bold to the string. This is based
3863
+ # on Highline implementation and it automatically appends CLEAR to the end
3864
+ # of the returned String.
3865
+ #
3866
+ # source://thor//lib/thor/shell/html.rb#54
3867
+ def set_color(string, *colors); end
3868
+
3869
+ protected
3870
+
3871
+ # @return [Boolean]
3872
+ #
3873
+ # source://thor//lib/thor/shell/html.rb#79
3874
+ def can_display_colors?; end
3875
+ end
3876
+
3877
+ # Set the terminal's foreground HTML color to black.
3878
+ #
3879
+ # source://thor//lib/thor/shell/html.rb#16
3880
+ Thor::Shell::HTML::BLACK = T.let(T.unsafe(nil), String)
3881
+
3882
+ # Set the terminal's foreground HTML color to blue.
3883
+ #
3884
+ # source://thor//lib/thor/shell/html.rb#24
3885
+ Thor::Shell::HTML::BLUE = T.let(T.unsafe(nil), String)
3886
+
3887
+ # The start of an HTML bold sequence.
3888
+ #
3889
+ # source://thor//lib/thor/shell/html.rb#13
3890
+ Thor::Shell::HTML::BOLD = T.let(T.unsafe(nil), String)
3891
+
3892
+ # Set the terminal's foreground HTML color to cyan.
3893
+ #
3894
+ # source://thor//lib/thor/shell/html.rb#28
3895
+ Thor::Shell::HTML::CYAN = T.let(T.unsafe(nil), String)
3896
+
3897
+ # Set the terminal's foreground HTML color to green.
3898
+ #
3899
+ # source://thor//lib/thor/shell/html.rb#20
3900
+ Thor::Shell::HTML::GREEN = T.let(T.unsafe(nil), String)
3901
+
3902
+ # Set the terminal's foreground HTML color to magenta.
3903
+ #
3904
+ # source://thor//lib/thor/shell/html.rb#26
3905
+ Thor::Shell::HTML::MAGENTA = T.let(T.unsafe(nil), String)
3906
+
3907
+ # Set the terminal's background HTML color to black.
3908
+ #
3909
+ # source://thor//lib/thor/shell/html.rb#33
3910
+ Thor::Shell::HTML::ON_BLACK = T.let(T.unsafe(nil), String)
3911
+
3912
+ # Set the terminal's background HTML color to blue.
3913
+ #
3914
+ # source://thor//lib/thor/shell/html.rb#41
3915
+ Thor::Shell::HTML::ON_BLUE = T.let(T.unsafe(nil), String)
3916
+
3917
+ # Set the terminal's background HTML color to cyan.
3918
+ #
3919
+ # source://thor//lib/thor/shell/html.rb#45
3920
+ Thor::Shell::HTML::ON_CYAN = T.let(T.unsafe(nil), String)
3921
+
3922
+ # Set the terminal's background HTML color to green.
3923
+ #
3924
+ # source://thor//lib/thor/shell/html.rb#37
3925
+ Thor::Shell::HTML::ON_GREEN = T.let(T.unsafe(nil), String)
3926
+
3927
+ # Set the terminal's background HTML color to magenta.
3928
+ #
3929
+ # source://thor//lib/thor/shell/html.rb#43
3930
+ Thor::Shell::HTML::ON_MAGENTA = T.let(T.unsafe(nil), String)
3931
+
3932
+ # Set the terminal's background HTML color to red.
3933
+ #
3934
+ # source://thor//lib/thor/shell/html.rb#35
3935
+ Thor::Shell::HTML::ON_RED = T.let(T.unsafe(nil), String)
3936
+
3937
+ # Set the terminal's background HTML color to white.
3938
+ #
3939
+ # source://thor//lib/thor/shell/html.rb#47
3940
+ Thor::Shell::HTML::ON_WHITE = T.let(T.unsafe(nil), String)
3941
+
3942
+ # Set the terminal's background HTML color to yellow.
3943
+ #
3944
+ # source://thor//lib/thor/shell/html.rb#39
3945
+ Thor::Shell::HTML::ON_YELLOW = T.let(T.unsafe(nil), String)
3946
+
3947
+ # Set the terminal's foreground HTML color to red.
3948
+ #
3949
+ # source://thor//lib/thor/shell/html.rb#18
3950
+ Thor::Shell::HTML::RED = T.let(T.unsafe(nil), String)
3951
+
3952
+ # Set the terminal's foreground HTML color to white.
3953
+ #
3954
+ # source://thor//lib/thor/shell/html.rb#30
3955
+ Thor::Shell::HTML::WHITE = T.let(T.unsafe(nil), String)
3956
+
3957
+ # Set the terminal's foreground HTML color to yellow.
3958
+ #
3959
+ # source://thor//lib/thor/shell/html.rb#22
3960
+ Thor::Shell::HTML::YELLOW = T.let(T.unsafe(nil), String)
3961
+
3962
+ # source://thor//lib/thor/shell.rb#24
3963
+ Thor::Shell::SHELL_DELEGATED_METHODS = T.let(T.unsafe(nil), Array)
3964
+
3965
+ # source://thor//lib/thor/shell/table_printer.rb#6
3966
+ class Thor::Shell::TablePrinter < ::Thor::Shell::ColumnPrinter
3967
+ # @return [TablePrinter] a new instance of TablePrinter
3968
+ #
3969
+ # source://thor//lib/thor/shell/table_printer.rb#9
3970
+ def initialize(stdout, options = T.unsafe(nil)); end
3971
+
3972
+ # source://thor//lib/thor/shell/table_printer.rb#18
3973
+ def print(array); end
3974
+
3975
+ private
3976
+
3977
+ # source://thor//lib/thor/shell/table_printer.rb#72
3978
+ def format_cell(column, row_size, index); end
3979
+
3980
+ # source://thor//lib/thor/shell/table_printer.rb#113
3981
+ def indentation; end
3982
+
3983
+ # source://thor//lib/thor/shell/table_printer.rb#47
3984
+ def prepare(array); end
3985
+
3986
+ # source://thor//lib/thor/shell/table_printer.rb#96
3987
+ def print_border_separator; end
3988
+
3989
+ # source://thor//lib/thor/shell/table_printer.rb#103
3990
+ def truncate(string); end
3991
+ end
3992
+
3993
+ # source://thor//lib/thor/shell/table_printer.rb#7
3994
+ Thor::Shell::TablePrinter::BORDER_SEPARATOR = T.let(T.unsafe(nil), Symbol)
3995
+
3996
+ # source://thor//lib/thor/shell/terminal.rb#3
3997
+ module Thor::Shell::Terminal
3998
+ class << self
3999
+ # source://thor//lib/thor/shell/terminal.rb#9
4000
+ def terminal_width; end
4001
+
4002
+ # @return [Boolean]
4003
+ #
4004
+ # source://thor//lib/thor/shell/terminal.rb#20
4005
+ def unix?; end
4006
+
4007
+ private
4008
+
4009
+ # Calculate the dynamic width of the terminal
4010
+ #
4011
+ # source://thor//lib/thor/shell/terminal.rb#27
4012
+ def dynamic_width; end
4013
+
4014
+ # source://thor//lib/thor/shell/terminal.rb#31
4015
+ def dynamic_width_stty; end
4016
+
4017
+ # source://thor//lib/thor/shell/terminal.rb#35
4018
+ def dynamic_width_tput; end
4019
+ end
4020
+ end
4021
+
4022
+ # source://thor//lib/thor/shell/terminal.rb#4
4023
+ Thor::Shell::Terminal::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer)
4024
+
4025
+ # source://thor//lib/thor/shell/wrapped_printer.rb#6
4026
+ class Thor::Shell::WrappedPrinter < ::Thor::Shell::ColumnPrinter
4027
+ # source://thor//lib/thor/shell/wrapped_printer.rb#7
4028
+ def print(message); end
4029
+ end
4030
+
4031
+ # source://thor//lib/thor/base.rb#23
4032
+ Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String)
4033
+
4034
+ # Thor methods that should not be overwritten by the user.
4035
+ #
4036
+ # source://thor//lib/thor/base.rb#20
4037
+ Thor::THOR_RESERVED_WORDS = T.let(T.unsafe(nil), Array)
4038
+
4039
+ # source://thor//lib/thor/command.rb#126
4040
+ Thor::Task = Thor::Command
4041
+
4042
+ # Raised when a command was not found.
4043
+ #
4044
+ # source://thor//lib/thor/error.rb#24
4045
+ class Thor::UndefinedCommandError < ::Thor::Error
4046
+ include ::Thor::Correctable
4047
+
4048
+ # @return [UndefinedCommandError] a new instance of UndefinedCommandError
4049
+ #
4050
+ # source://thor//lib/thor/error.rb#43
4051
+ def initialize(command, all_commands, namespace); end
4052
+
4053
+ # Returns the value of attribute all_commands.
4054
+ #
4055
+ # source://thor//lib/thor/error.rb#41
4056
+ def all_commands; end
4057
+
4058
+ # Returns the value of attribute command.
4059
+ #
4060
+ # source://thor//lib/thor/error.rb#41
4061
+ def command; end
4062
+ end
4063
+
4064
+ # source://thor//lib/thor/error.rb#25
4065
+ class Thor::UndefinedCommandError::SpellChecker
4066
+ # @return [SpellChecker] a new instance of SpellChecker
4067
+ #
4068
+ # source://thor//lib/thor/error.rb#28
4069
+ def initialize(error); end
4070
+
4071
+ # source://thor//lib/thor/error.rb#32
4072
+ def corrections; end
4073
+
4074
+ # Returns the value of attribute error.
4075
+ #
4076
+ # source://thor//lib/thor/error.rb#26
4077
+ def error; end
4078
+
4079
+ # source://thor//lib/thor/error.rb#36
4080
+ def spell_checker; end
4081
+ end
4082
+
4083
+ # source://thor//lib/thor/error.rb#55
4084
+ Thor::UndefinedTaskError = Thor::UndefinedCommandError
4085
+
4086
+ # source://thor//lib/thor/error.rb#65
4087
+ class Thor::UnknownArgumentError < ::Thor::Error
4088
+ include ::Thor::Correctable
4089
+
4090
+ # @return [UnknownArgumentError] a new instance of UnknownArgumentError
4091
+ #
4092
+ # source://thor//lib/thor/error.rb#85
4093
+ def initialize(switches, unknown); end
4094
+
4095
+ # Returns the value of attribute switches.
4096
+ #
4097
+ # source://thor//lib/thor/error.rb#83
4098
+ def switches; end
4099
+
4100
+ # Returns the value of attribute unknown.
4101
+ #
4102
+ # source://thor//lib/thor/error.rb#83
4103
+ def unknown; end
4104
+ end
4105
+
4106
+ # source://thor//lib/thor/error.rb#66
4107
+ class Thor::UnknownArgumentError::SpellChecker
4108
+ # @return [SpellChecker] a new instance of SpellChecker
4109
+ #
4110
+ # source://thor//lib/thor/error.rb#69
4111
+ def initialize(error); end
4112
+
4113
+ # source://thor//lib/thor/error.rb#73
4114
+ def corrections; end
4115
+
4116
+ # Returns the value of attribute error.
4117
+ #
4118
+ # source://thor//lib/thor/error.rb#67
4119
+ def error; end
4120
+
4121
+ # source://thor//lib/thor/error.rb#78
4122
+ def spell_checker; end
4123
+ end
4124
+
4125
+ # This module holds several utilities:
4126
+ #
4127
+ # 1) Methods to convert thor namespaces to constants and vice-versa.
4128
+ #
4129
+ # Thor::Util.namespace_from_thor_class(Foo::Bar::Baz) #=> "foo:bar:baz"
4130
+ #
4131
+ # 2) Loading thor files and sandboxing:
4132
+ #
4133
+ # Thor::Util.load_thorfile("~/.thor/foo")
4134
+ #
4135
+ # source://thor//lib/thor/util.rb#17
4136
+ module Thor::Util
4137
+ class << self
4138
+ # Receives a string and convert it to camel case. camel_case returns CamelCase.
4139
+ #
4140
+ # ==== Parameters
4141
+ # String
4142
+ #
4143
+ # ==== Returns
4144
+ # String
4145
+ #
4146
+ # source://thor//lib/thor/util.rb#104
4147
+ def camel_case(str); end
4148
+
4149
+ # Returns a string that has had any glob characters escaped.
4150
+ # The glob characters are `* ? { } [ ]`.
4151
+ #
4152
+ # ==== Examples
4153
+ #
4154
+ # Thor::Util.escape_globs('[apps]') # => '\[apps\]'
4155
+ #
4156
+ # ==== Parameters
4157
+ # String
4158
+ #
4159
+ # ==== Returns
4160
+ # String
4161
+ #
4162
+ # source://thor//lib/thor/util.rb#264
4163
+ def escape_globs(path); end
4164
+
4165
+ # Returns a string that has had any HTML characters escaped.
4166
+ #
4167
+ # ==== Examples
4168
+ #
4169
+ # Thor::Util.escape_html('<div>') # => "&lt;div&gt;"
4170
+ #
4171
+ # ==== Parameters
4172
+ # String
4173
+ #
4174
+ # ==== Returns
4175
+ # String
4176
+ #
4177
+ # source://thor//lib/thor/util.rb#280
4178
+ def escape_html(string); end
4179
+
4180
+ # Receives a namespace and search for it in the Thor::Base subclasses.
4181
+ #
4182
+ # ==== Parameters
4183
+ # namespace<String>:: The namespace to search for.
4184
+ #
4185
+ # source://thor//lib/thor/util.rb#24
4186
+ def find_by_namespace(namespace); end
4187
+
4188
+ # Receives a namespace and tries to retrieve a Thor or Thor::Group class
4189
+ # from it. It first searches for a class using the all the given namespace,
4190
+ # if it's not found, removes the highest entry and searches for the class
4191
+ # again. If found, returns the highest entry as the class name.
4192
+ #
4193
+ # ==== Examples
4194
+ #
4195
+ # class Foo::Bar < Thor
4196
+ # def baz
4197
+ # end
4198
+ # end
4199
+ #
4200
+ # class Baz::Foo < Thor::Group
4201
+ # end
4202
+ #
4203
+ # Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command
4204
+ # Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil
4205
+ # Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz"
4206
+ #
4207
+ # ==== Parameters
4208
+ # namespace<String>
4209
+ #
4210
+ # source://thor//lib/thor/util.rb#131
4211
+ def find_class_and_command_by_namespace(namespace, fallback = T.unsafe(nil)); end
4212
+
4213
+ # Receives a namespace and tries to retrieve a Thor or Thor::Group class
4214
+ # from it. It first searches for a class using the all the given namespace,
4215
+ # if it's not found, removes the highest entry and searches for the class
4216
+ # again. If found, returns the highest entry as the class name.
4217
+ #
4218
+ # ==== Examples
4219
+ #
4220
+ # class Foo::Bar < Thor
4221
+ # def baz
4222
+ # end
4223
+ # end
4224
+ #
4225
+ # class Baz::Foo < Thor::Group
4226
+ # end
4227
+ #
4228
+ # Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command
4229
+ # Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil
4230
+ # Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz"
4231
+ #
4232
+ # ==== Parameters
4233
+ # namespace<String>
4234
+ #
4235
+ # source://thor//lib/thor/util.rb#131
4236
+ def find_class_and_task_by_namespace(namespace, fallback = T.unsafe(nil)); end
4237
+
4238
+ # Where to look for Thor files.
4239
+ #
4240
+ # source://thor//lib/thor/util.rb#213
4241
+ def globs_for(path); end
4242
+
4243
+ # Receives a path and load the thor file in the path. The file is evaluated
4244
+ # inside the sandbox to avoid namespacing conflicts.
4245
+ #
4246
+ # source://thor//lib/thor/util.rb#153
4247
+ def load_thorfile(path, content = T.unsafe(nil), debug = T.unsafe(nil)); end
4248
+
4249
+ # Receives a constant and converts it to a Thor namespace. Since Thor
4250
+ # commands can be added to a sandbox, this method is also responsible for
4251
+ # removing the sandbox namespace.
4252
+ #
4253
+ # This method should not be used in general because it's used to deal with
4254
+ # older versions of Thor. On current versions, if you need to get the
4255
+ # namespace from a class, just call namespace on it.
4256
+ #
4257
+ # ==== Parameters
4258
+ # constant<Object>:: The constant to be converted to the thor path.
4259
+ #
4260
+ # ==== Returns
4261
+ # String:: If we receive Foo::Bar::Baz it returns "foo:bar:baz"
4262
+ #
4263
+ # source://thor//lib/thor/util.rb#43
4264
+ def namespace_from_thor_class(constant); end
4265
+
4266
+ # Given the contents, evaluate it inside the sandbox and returns the
4267
+ # namespaces defined in the sandbox.
4268
+ #
4269
+ # ==== Parameters
4270
+ # contents<String>
4271
+ #
4272
+ # ==== Returns
4273
+ # Array[Object]
4274
+ #
4275
+ # source://thor//lib/thor/util.rb#58
4276
+ def namespaces_in_content(contents, file = T.unsafe(nil)); end
4277
+
4278
+ # Return the path to the ruby interpreter taking into account multiple
4279
+ # installations and windows extensions.
4280
+ #
4281
+ # source://thor//lib/thor/util.rb#221
4282
+ def ruby_command; end
4283
+
4284
+ # Receives a string and convert it to snake case. SnakeCase returns snake_case.
4285
+ #
4286
+ # ==== Parameters
4287
+ # String
4288
+ #
4289
+ # ==== Returns
4290
+ # String
4291
+ #
4292
+ # source://thor//lib/thor/util.rb#90
4293
+ def snake_case(str); end
4294
+
4295
+ # Returns the thor classes declared inside the given class.
4296
+ #
4297
+ # source://thor//lib/thor/util.rb#74
4298
+ def thor_classes_in(klass); end
4299
+
4300
+ # Returns the root where thor files are located, depending on the OS.
4301
+ #
4302
+ # source://thor//lib/thor/util.rb#192
4303
+ def thor_root; end
4304
+
4305
+ # Returns the files in the thor root. On Windows thor_root will be something
4306
+ # like this:
4307
+ #
4308
+ # C:\Documents and Settings\james\.thor
4309
+ #
4310
+ # If we don't #gsub the \ character, Dir.glob will fail.
4311
+ #
4312
+ # source://thor//lib/thor/util.rb#203
4313
+ def thor_root_glob; end
4314
+
4315
+ # source://thor//lib/thor/util.rb#168
4316
+ def user_home; end
4317
+ end
4318
+ end