toys 0.17.1 → 0.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/README.md +3 -3
  4. data/core-docs/toys/acceptor.rb +474 -0
  5. data/core-docs/toys/arg_parser.rb +397 -0
  6. data/core-docs/toys/cli.rb +466 -0
  7. data/core-docs/toys/compat.rb +2 -0
  8. data/core-docs/toys/completion.rb +340 -0
  9. data/core-docs/toys/context.rb +386 -0
  10. data/core-docs/toys/core.rb +14 -0
  11. data/core-docs/toys/dsl/base.rb +56 -0
  12. data/core-docs/toys/dsl/flag.rb +287 -0
  13. data/core-docs/toys/dsl/flag_group.rb +270 -0
  14. data/core-docs/toys/dsl/internal.rb +4 -0
  15. data/core-docs/toys/dsl/positional_arg.rb +155 -0
  16. data/core-docs/toys/dsl/tool.rb +1663 -0
  17. data/core-docs/toys/errors.rb +126 -0
  18. data/core-docs/toys/flag.rb +563 -0
  19. data/core-docs/toys/flag_group.rb +186 -0
  20. data/core-docs/toys/input_file.rb +17 -0
  21. data/core-docs/toys/loader.rb +411 -0
  22. data/core-docs/toys/middleware.rb +336 -0
  23. data/core-docs/toys/mixin.rb +142 -0
  24. data/core-docs/toys/module_lookup.rb +75 -0
  25. data/core-docs/toys/positional_arg.rb +145 -0
  26. data/core-docs/toys/settings.rb +524 -0
  27. data/core-docs/toys/source_info.rb +321 -0
  28. data/core-docs/toys/standard_middleware/add_verbosity_flags.rb +49 -0
  29. data/core-docs/toys/standard_middleware/apply_config.rb +24 -0
  30. data/core-docs/toys/standard_middleware/handle_usage_errors.rb +33 -0
  31. data/core-docs/toys/standard_middleware/set_default_descriptions.rb +222 -0
  32. data/core-docs/toys/standard_middleware/show_help.rb +190 -0
  33. data/core-docs/toys/standard_middleware/show_root_version.rb +45 -0
  34. data/core-docs/toys/standard_mixins/bundler.rb +98 -0
  35. data/core-docs/toys/standard_mixins/exec.rb +711 -0
  36. data/core-docs/toys/standard_mixins/fileutils.rb +18 -0
  37. data/core-docs/toys/standard_mixins/gems.rb +74 -0
  38. data/core-docs/toys/standard_mixins/git_cache.rb +41 -0
  39. data/core-docs/toys/standard_mixins/highline.rb +133 -0
  40. data/core-docs/toys/standard_mixins/pager.rb +50 -0
  41. data/core-docs/toys/standard_mixins/terminal.rb +135 -0
  42. data/core-docs/toys/standard_mixins/xdg.rb +49 -0
  43. data/core-docs/toys/template.rb +112 -0
  44. data/core-docs/toys/tool_definition.rb +1080 -0
  45. data/core-docs/toys/utils/completion_engine.rb +49 -0
  46. data/core-docs/toys/utils/exec.rb +776 -0
  47. data/core-docs/toys/utils/gems.rb +185 -0
  48. data/core-docs/toys/utils/git_cache.rb +368 -0
  49. data/core-docs/toys/utils/help_text.rb +134 -0
  50. data/core-docs/toys/utils/pager.rb +118 -0
  51. data/core-docs/toys/utils/standard_ui.rb +184 -0
  52. data/core-docs/toys/utils/terminal.rb +310 -0
  53. data/core-docs/toys/utils/xdg.rb +253 -0
  54. data/core-docs/toys/wrappable_string.rb +132 -0
  55. data/core-docs/toys-core.rb +111 -0
  56. data/lib/toys/version.rb +1 -1
  57. metadata +57 -5
@@ -0,0 +1,126 @@
1
+ module Toys
2
+ ##
3
+ # **_Defined in the toys-core gem_**
4
+ #
5
+ # An exception indicating an error in a tool definition.
6
+ #
7
+ class ToolDefinitionError < ::StandardError
8
+ end
9
+
10
+ ##
11
+ # **_Defined in the toys-core gem_**
12
+ #
13
+ # An exception indicating that a tool has no run method.
14
+ #
15
+ class NotRunnableError < ::StandardError
16
+ end
17
+
18
+ ##
19
+ # **_Defined in the toys-core gem_**
20
+ #
21
+ # An exception indicating problems parsing arguments.
22
+ #
23
+ class ArgParsingError < ::StandardError
24
+ ##
25
+ # Create an ArgParsingError given a set of error messages
26
+ # @param errors [Array<Toys::ArgParser::UsageError>]
27
+ #
28
+ def initialize(errors)
29
+ # Source available in the toys-core gem
30
+ end
31
+
32
+ ##
33
+ # The individual usage error messages.
34
+ # @return [Array<Toys::ArgParser::UsageError>]
35
+ #
36
+ attr_reader :usage_errors
37
+ end
38
+
39
+ ##
40
+ # **_Defined in the toys-core gem_**
41
+ #
42
+ # An exception indicating a problem during tool lookup
43
+ #
44
+ class LoaderError < ::StandardError
45
+ end
46
+
47
+ ##
48
+ # **_Defined in the toys-core gem_**
49
+ #
50
+ # A wrapper exception used to provide user-oriented context for an error
51
+ # thrown during tool execution.
52
+ #
53
+ class ContextualError < ::StandardError
54
+ ##
55
+ # Construct a ContextualError. This exception type is thrown from
56
+ # {ContextualError.capture} and {ContextualError.capture_path} and should
57
+ # not be constructed directly.
58
+ #
59
+ # @private This interface is internal and subject to change without warning.
60
+ #
61
+ def initialize(cause, banner,
62
+ config_path: nil, config_line: nil,
63
+ tool_name: nil, tool_args: nil)
64
+ # Source available in the toys-core gem
65
+ end
66
+
67
+ ##
68
+ # The underlying exception
69
+ # @return [::StandardError]
70
+ #
71
+ attr_reader :cause
72
+
73
+ ##
74
+ # An overall banner message
75
+ # @return [String]
76
+ #
77
+ attr_reader :banner
78
+
79
+ ##
80
+ # The path to the toys config file in which the error was detected
81
+ # @return [String]
82
+ #
83
+ attr_reader :config_path
84
+
85
+ ##
86
+ # The line number in the toys config file in which the error was detected
87
+ # @return [Integer]
88
+ #
89
+ attr_reader :config_line
90
+
91
+ ##
92
+ # The full name of the tool that was running when the error occurred
93
+ # @return [Array<String>]
94
+ #
95
+ attr_reader :tool_name
96
+
97
+ ##
98
+ # The arguments passed to the tool that was running when the error occurred
99
+ # @return [Array<String>]
100
+ #
101
+ attr_reader :tool_args
102
+
103
+ class << self
104
+ ##
105
+ # Execute the given block, and wrap any exceptions thrown with a
106
+ # ContextualError. This is intended for loading a config file from the
107
+ # given path, and wraps any Ruby parsing errors.
108
+ #
109
+ # @private This interface is internal and subject to change without warning.
110
+ #
111
+ def capture_path(banner, path, **opts)
112
+ # Source available in the toys-core gem
113
+ end
114
+
115
+ ##
116
+ # Execute the given block, and wrap any exceptions thrown with a
117
+ # ContextualError.
118
+ #
119
+ # @private This interface is internal and subject to change without warning.
120
+ #
121
+ def capture(banner, **opts)
122
+ # Source available in the toys-core gem
123
+ end
124
+ end
125
+ end
126
+ end
@@ -0,0 +1,563 @@
1
+ module Toys
2
+ ##
3
+ # **_Defined in the toys-core gem_**
4
+ #
5
+ # Representation of a formal set of flags that set a particular context
6
+ # key. The flags within a single Flag definition are synonyms.
7
+ #
8
+ class Flag
9
+ ##
10
+ # **_Defined in the toys-core gem_**
11
+ #
12
+ # Representation of a single flag.
13
+ #
14
+ class Syntax
15
+ # rubocop:disable Style/PerlBackrefs
16
+
17
+ ##
18
+ # Parse flag syntax
19
+ # @param str [String] syntax.
20
+ #
21
+ def initialize(str)
22
+ # Source available in the toys-core gem
23
+ end
24
+
25
+ # rubocop:enable Style/PerlBackrefs
26
+
27
+ ##
28
+ # The original string that was parsed to produce this syntax.
29
+ # @return [String]
30
+ #
31
+ attr_reader :original_str
32
+
33
+ ##
34
+ # The flags (without values) corresponding to this syntax.
35
+ # @return [Array<String>]
36
+ #
37
+ attr_reader :flags
38
+
39
+ ##
40
+ # The flag (without values) corresponding to the normal "positive" form
41
+ # of this flag.
42
+ # @return [String]
43
+ #
44
+ attr_reader :positive_flag
45
+
46
+ ##
47
+ # The flag (without values) corresponding to the "negative" form of this
48
+ # flag, if any. i.e. if the original string was `"--[no-]abc"`, the
49
+ # negative flag is `"--no-abc"`.
50
+ # @return [String] The negative form.
51
+ # @return [nil] if the flag has no negative form.
52
+ #
53
+ attr_reader :negative_flag
54
+
55
+ ##
56
+ # The original string with the value (if any) stripped, but retaining
57
+ # the `[no-]` prefix if present.
58
+ # @return [String]
59
+ #
60
+ attr_reader :str_without_value
61
+
62
+ ##
63
+ # A string used to sort this flag compared with others.
64
+ # @return [String]
65
+ #
66
+ attr_reader :sort_str
67
+
68
+ ##
69
+ # The style of flag (`:long` or `:short`).
70
+ # @return [:long] if this is a long flag (i.e. double hyphen)
71
+ # @return [:short] if this is a short flag (i.e. single hyphen with one
72
+ # character).
73
+ #
74
+ attr_reader :flag_style
75
+
76
+ ##
77
+ # The type of flag (`:boolean` or `:value`)
78
+ # @return [:boolean] if this is a boolean flag (i.e. no value)
79
+ # @return [:value] if this flag takes a value (even if optional)
80
+ # @return [nil] if this flag is indeterminate
81
+ #
82
+ attr_reader :flag_type
83
+
84
+ ##
85
+ # The type of value (`:required` or `:optional`)
86
+ # @return [:required] if this flag takes a required value
87
+ # @return [:optional] if this flag takes an optional value
88
+ # @return [nil] if this flag is a boolean flag
89
+ #
90
+ attr_reader :value_type
91
+
92
+ ##
93
+ # The default delimiter used for the value of this flag. This could be
94
+ # `""` or `" "` for a short flag, or `" "` or `"="` for a long flag.
95
+ # @return [String] delimiter
96
+ # @return [nil] if this flag is a boolean flag
97
+ #
98
+ attr_reader :value_delim
99
+
100
+ ##
101
+ # The default "label" for the value. e.g. in `--abc=VAL` the label is
102
+ # `"VAL"`.
103
+ # @return [String] the label
104
+ # @return [nil] if this flag is a boolean flag
105
+ #
106
+ attr_reader :value_label
107
+
108
+ ##
109
+ # A canonical string representing this flag's syntax, normalized to match
110
+ # the type, delimiters, etc. settings of other flag syntaxes. This is
111
+ # generally used in help strings to represent this flag.
112
+ # @return [String]
113
+ #
114
+ attr_reader :canonical_str
115
+
116
+ ##
117
+ # This method is accessible for testing only.
118
+ #
119
+ # @private This interface is internal and subject to change without warning.
120
+ #
121
+ def configure_canonical(canonical_flag_type, canonical_value_type,
122
+ canonical_value_label, canonical_value_delim)
123
+ # Source available in the toys-core gem
124
+ end
125
+ end
126
+
127
+ ##
128
+ # **_Defined in the toys-core gem_**
129
+ #
130
+ # The result of looking up a flag by name.
131
+ #
132
+ class Resolution
133
+ ##
134
+ # The flag string that was looked up
135
+ # @return [String]
136
+ #
137
+ attr_reader :string
138
+
139
+ ##
140
+ # Whether an exact match of the string was found
141
+ # @return [Boolean]
142
+ #
143
+ def found_exact?
144
+ # Source available in the toys-core gem
145
+ end
146
+
147
+ ##
148
+ # The number of matches that were found.
149
+ # @return [Integer]
150
+ #
151
+ def count
152
+ # Source available in the toys-core gem
153
+ end
154
+
155
+ ##
156
+ # Whether a single unique match was found.
157
+ # @return [Boolean]
158
+ #
159
+ def found_unique?
160
+ # Source available in the toys-core gem
161
+ end
162
+
163
+ ##
164
+ # Whether no matches were found.
165
+ # @return [Boolean]
166
+ #
167
+ def not_found?
168
+ # Source available in the toys-core gem
169
+ end
170
+
171
+ ##
172
+ # Whether multiple matches were found (i.e. ambiguous input).
173
+ # @return [Boolean]
174
+ #
175
+ def found_multiple?
176
+ # Source available in the toys-core gem
177
+ end
178
+
179
+ ##
180
+ # Return the unique {Toys::Flag}, or `nil` if not found or
181
+ # not unique.
182
+ # @return [Toys::Flag,nil]
183
+ #
184
+ def unique_flag
185
+ # Source available in the toys-core gem
186
+ end
187
+
188
+ ##
189
+ # Return the unique {Toys::Flag::Syntax}, or `nil` if not found
190
+ # or not unique.
191
+ # @return [Toys::Flag::Syntax,nil]
192
+ #
193
+ def unique_flag_syntax
194
+ # Source available in the toys-core gem
195
+ end
196
+
197
+ ##
198
+ # Return whether the unique match was a hit on the negative (`--no-*`)
199
+ # case, or `nil` if not found or not unique.
200
+ # @return [Boolean,nil]
201
+ #
202
+ def unique_flag_negative?
203
+ # Source available in the toys-core gem
204
+ end
205
+
206
+ ##
207
+ # Returns an array of the matching full flag strings.
208
+ # @return [Array<String>]
209
+ #
210
+ def matching_flag_strings
211
+ # Source available in the toys-core gem
212
+ end
213
+ end
214
+
215
+ ##
216
+ # **_Defined in the toys-core gem_**
217
+ #
218
+ # A Completion that returns all possible flags associated with a
219
+ # {Toys::Flag}.
220
+ #
221
+ class DefaultCompletion < Completion::Base
222
+ ##
223
+ # Create a completion given configuration options.
224
+ #
225
+ # @param flag [Toys::Flag] The flag definition.
226
+ # @param include_short [Boolean] Whether to include short flags.
227
+ # @param include_long [Boolean] Whether to include long flags.
228
+ # @param include_negative [Boolean] Whether to include `--no-*` forms.
229
+ #
230
+ def initialize(flag:, include_short: true, include_long: true, include_negative: true)
231
+ # Source available in the toys-core gem
232
+ end
233
+
234
+ ##
235
+ # Whether to include short flags
236
+ # @return [Boolean]
237
+ #
238
+ def include_short?
239
+ # Source available in the toys-core gem
240
+ end
241
+
242
+ ##
243
+ # Whether to include long flags
244
+ # @return [Boolean]
245
+ #
246
+ def include_long?
247
+ # Source available in the toys-core gem
248
+ end
249
+
250
+ ##
251
+ # Whether to include negative long flags
252
+ # @return [Boolean]
253
+ #
254
+ def include_negative?
255
+ # Source available in the toys-core gem
256
+ end
257
+
258
+ ##
259
+ # Returns candidates for the current completion.
260
+ #
261
+ # @param context [Toys::Completion::Context] the current completion
262
+ # context including the string fragment.
263
+ # @return [Array<Toys::Completion::Candidate>] an array of candidates
264
+ #
265
+ def call(context)
266
+ # Source available in the toys-core gem
267
+ end
268
+ end
269
+
270
+ ##
271
+ # The set handler replaces the previous value.
272
+ # @return [Proc]
273
+ #
274
+ SET_HANDLER = proc { |val| val }
275
+
276
+ ##
277
+ # The push handler pushes the given value using the `<<` operator.
278
+ # @return [Proc]
279
+ #
280
+ PUSH_HANDLER = proc { |val, prev| prev.nil? ? [val] : prev << val }
281
+
282
+ ##
283
+ # The default handler is the set handler, which replaces the previous value.
284
+ # @return [Proc]
285
+ #
286
+ DEFAULT_HANDLER = SET_HANDLER
287
+
288
+ ##
289
+ # Create a flag definition.
290
+ #
291
+ # @param key [String,Symbol] The key to use to retrieve the value from
292
+ # the execution context.
293
+ # @param flags [Array<String>] The flags in OptionParser format. If empty,
294
+ # a flag will be inferred from the key.
295
+ # @param accept [Object] An acceptor that validates and/or converts the
296
+ # value. See {Toys::Acceptor.create} for recognized formats. Optional.
297
+ # If not specified, defaults to {Toys::Acceptor::DEFAULT}.
298
+ # @param default [Object] The default value. This is the value that will
299
+ # be set in the context if this flag is not provided on the command
300
+ # line. Defaults to `nil`.
301
+ # @param handler [Proc,nil,:set,:push] An optional handler that customizes
302
+ # how a value is set or updated when the flag is parsed.
303
+ # A handler is a proc that takes up to three arguments: the given
304
+ # value, the previous value, and a hash containing all the data
305
+ # collected so far during argument parsing. The proc must return the
306
+ # new value for the flag.
307
+ # You may also specify a predefined named handler. The `:set` handler
308
+ # (the default) replaces the previous value (effectively
309
+ # `-> (val) { val }`). The `:push` handler expects the previous value
310
+ # to be an array and pushes the given value onto it; it should be
311
+ # combined with setting `default: []` and is intended for
312
+ # "multi-valued" flags.
313
+ # @param complete_flags [Object] A specifier for shell tab completion for
314
+ # flag names associated with this flag. By default, a
315
+ # {Toys::Flag::DefaultCompletion} is used, which provides the flag's
316
+ # names as completion candidates. To customize completion, set this to
317
+ # a hash of options to pass to the constructor for
318
+ # {Toys::Flag::DefaultCompletion}, or pass any other spec recognized
319
+ # by {Toys::Completion.create}.
320
+ # @param complete_values [Object] A specifier for shell tab completion for
321
+ # flag values associated with this flag. Pass any spec recognized by
322
+ # {Toys::Completion.create}.
323
+ # @param report_collisions [Boolean] Raise an exception if a flag is
324
+ # requested that is already in use or marked as disabled. Default is
325
+ # true.
326
+ # @param group [Toys::FlagGroup] Group containing this flag.
327
+ # @param desc [String,Array<String>,Toys::WrappableString] Short
328
+ # description for the flag. See {Toys::ToolDefinition#desc} for a
329
+ # description of allowed formats. Defaults to the empty string.
330
+ # @param long_desc [Array<String,Array<String>,Toys::WrappableString>]
331
+ # Long description for the flag. See {Toys::ToolDefinition#long_desc}
332
+ # for a description of allowed formats. Defaults to the empty array.
333
+ # @param display_name [String] A display name for this flag, used in help
334
+ # text and error messages.
335
+ # @param used_flags [Array<String>] An array of flags already in use.
336
+ #
337
+ def self.create(key, flags = [],
338
+ used_flags: nil, report_collisions: true, accept: nil, handler: nil,
339
+ default: nil, complete_flags: nil, complete_values: nil, display_name: nil,
340
+ desc: nil, long_desc: nil, group: nil)
341
+ # Source available in the toys-core gem
342
+ end
343
+
344
+ ##
345
+ # Returns the flag group containing this flag
346
+ # @return [Toys::FlagGroup]
347
+ #
348
+ attr_reader :group
349
+
350
+ ##
351
+ # Returns the key.
352
+ # @return [Symbol]
353
+ #
354
+ attr_reader :key
355
+
356
+ ##
357
+ # Returns an array of Flag::Syntax for the flags.
358
+ # @return [Array<Toys::Flag::Syntax>]
359
+ #
360
+ attr_reader :flag_syntax
361
+
362
+ ##
363
+ # Returns the effective acceptor.
364
+ # @return [Toys::Acceptor::Base]
365
+ #
366
+ attr_reader :acceptor
367
+
368
+ ##
369
+ # Returns the default value, which may be `nil`.
370
+ # @return [Object]
371
+ #
372
+ attr_reader :default
373
+
374
+ ##
375
+ # The short description string.
376
+ #
377
+ # When reading, this is always returned as a {Toys::WrappableString}.
378
+ #
379
+ # When setting, the description may be provided as any of the following:
380
+ # * A {Toys::WrappableString}.
381
+ # * A normal String, which will be transformed into a
382
+ # {Toys::WrappableString} using spaces as word delimiters.
383
+ # * An Array of String, which will be transformed into a
384
+ # {Toys::WrappableString} where each array element represents an
385
+ # individual word for wrapping.
386
+ #
387
+ # @return [Toys::WrappableString]
388
+ #
389
+ attr_reader :desc
390
+
391
+ ##
392
+ # The long description strings.
393
+ #
394
+ # When reading, this is returned as an Array of {Toys::WrappableString}
395
+ # representing the lines in the description.
396
+ #
397
+ # When setting, the description must be provided as an Array where *each
398
+ # element* may be any of the following:
399
+ # * A {Toys::WrappableString} representing one line.
400
+ # * A normal String representing a line. This will be transformed into a
401
+ # {Toys::WrappableString} using spaces as word delimiters.
402
+ # * An Array of String representing a line. This will be transformed into
403
+ # a {Toys::WrappableString} where each array element represents an
404
+ # individual word for wrapping.
405
+ #
406
+ # @return [Array<Toys::WrappableString>]
407
+ #
408
+ attr_reader :long_desc
409
+
410
+ ##
411
+ # The handler for setting/updating the value.
412
+ # @return [Proc]
413
+ #
414
+ attr_reader :handler
415
+
416
+ ##
417
+ # The proc that determines shell completions for the flag.
418
+ # @return [Proc,Toys::Completion::Base]
419
+ #
420
+ attr_reader :flag_completion
421
+
422
+ ##
423
+ # The proc that determines shell completions for the value.
424
+ # @return [Proc,Toys::Completion::Base]
425
+ #
426
+ attr_reader :value_completion
427
+
428
+ ##
429
+ # The type of flag.
430
+ #
431
+ # @return [:boolean] if the flag is a simple boolean switch
432
+ # @return [:value] if the flag sets a value
433
+ #
434
+ attr_reader :flag_type
435
+
436
+ ##
437
+ # The type of value.
438
+ #
439
+ # @return [:required] if the flag type is `:value` and the value is
440
+ # required.
441
+ # @return [:optional] if the flag type is `:value` and the value is
442
+ # optional.
443
+ # @return [nil] if the flag type is not `:value`.
444
+ #
445
+ attr_reader :value_type
446
+
447
+ ##
448
+ # The string label for the value as it should display in help.
449
+ # @return [String] The label
450
+ # @return [nil] if the flag type is not `:value`.
451
+ #
452
+ attr_reader :value_label
453
+
454
+ ##
455
+ # The value delimiter, which may be `""`, `" "`, or `"="`.
456
+ #
457
+ # @return [String] The delimiter
458
+ # @return [nil] if the flag type is not `:value`.
459
+ #
460
+ attr_reader :value_delim
461
+
462
+ ##
463
+ # The display name of this flag.
464
+ # @return [String]
465
+ #
466
+ attr_reader :display_name
467
+
468
+ ##
469
+ # A string that can be used to sort this flag
470
+ # @return [String]
471
+ #
472
+ attr_reader :sort_str
473
+
474
+ ##
475
+ # An array of Flag::Syntax including only short (single dash) flags.
476
+ # @return [Array<Flag::Syntax>]
477
+ #
478
+ def short_flag_syntax
479
+ # Source available in the toys-core gem
480
+ end
481
+
482
+ ##
483
+ # An array of Flag::Syntax including only long (double-dash) flags.
484
+ # @return [Array<Flag::Syntax>]
485
+ #
486
+ def long_flag_syntax
487
+ # Source available in the toys-core gem
488
+ end
489
+
490
+ ##
491
+ # The list of all effective flags used.
492
+ # @return [Array<String>]
493
+ #
494
+ def effective_flags
495
+ # Source available in the toys-core gem
496
+ end
497
+
498
+ ##
499
+ # Look up the flag by string. Returns an object that indicates whether
500
+ # the given string matched this flag, whether the match was unique, and
501
+ # other pertinent information.
502
+ #
503
+ # @param str [String] Flag string to look up
504
+ # @return [Toys::Flag::Resolution] Information about the match.
505
+ #
506
+ def resolve(str)
507
+ # Source available in the toys-core gem
508
+ end
509
+
510
+ ##
511
+ # A list of canonical flag syntax strings.
512
+ #
513
+ # @return [Array<String>]
514
+ #
515
+ def canonical_syntax_strings
516
+ # Source available in the toys-core gem
517
+ end
518
+
519
+ ##
520
+ # Whether this flag is active--that is, it has a nonempty flags list.
521
+ #
522
+ # @return [Boolean]
523
+ #
524
+ def active?
525
+ # Source available in the toys-core gem
526
+ end
527
+
528
+ ##
529
+ # Set the short description string.
530
+ #
531
+ # See {#desc} for details.
532
+ #
533
+ # @param desc [Toys::WrappableString,String,Array<String>]
534
+ #
535
+ def desc=(desc)
536
+ # Source available in the toys-core gem
537
+ end
538
+
539
+ ##
540
+ # Set the long description strings.
541
+ #
542
+ # See {#long_desc} for details.
543
+ #
544
+ # @param long_desc [Array<Toys::WrappableString,String,Array<String>>]
545
+ #
546
+ def long_desc=(long_desc)
547
+ # Source available in the toys-core gem
548
+ end
549
+
550
+ ##
551
+ # Append long description strings.
552
+ #
553
+ # You must pass an array of lines in the long description. See {#long_desc}
554
+ # for details on how each line may be represented.
555
+ #
556
+ # @param long_desc [Array<Toys::WrappableString,String,Array<String>>]
557
+ # @return [self]
558
+ #
559
+ def append_long_desc(long_desc)
560
+ # Source available in the toys-core gem
561
+ end
562
+ end
563
+ end