mootool 0.2.7 → 0.2.8

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