Class: Toys::Flag::DefaultCompletion
- Inherits:
-
Completion::Base
- Object
- Completion::Base
- Toys::Flag::DefaultCompletion
- Defined in:
- core-docs/toys/flag.rb
Overview
A Completion that returns all possible flags associated with a Toys::Flag.
Defined in the toys-core gem
Instance Method Summary collapse
-
#call(context) ⇒ Array<Toys::Completion::Candidate>
Returns candidates for the current completion.
-
#include_long? ⇒ boolean
Whether to include long flags.
-
#include_negative? ⇒ boolean
Whether to include negative long flags.
-
#include_short? ⇒ boolean
Whether to include short flags.
-
#initialize(flag:, include_short: true, include_long: true, include_negative: true) ⇒ DefaultCompletion
constructor
Create a completion given configuration options.
Constructor Details
#initialize(flag:, include_short: true, include_long: true, include_negative: true) ⇒ DefaultCompletion
Create a completion given configuration options.
220 221 222 |
# File 'core-docs/toys/flag.rb', line 220 def initialize(flag:, include_short: true, include_long: true, include_negative: true) # Source available in the toys-core gem end |
Instance Method Details
#call(context) ⇒ Array<Toys::Completion::Candidate>
Returns candidates for the current completion.
255 256 257 |
# File 'core-docs/toys/flag.rb', line 255 def call(context) # Source available in the toys-core gem end |
#include_long? ⇒ boolean
Whether to include long flags
236 237 238 |
# File 'core-docs/toys/flag.rb', line 236 def include_long? # Source available in the toys-core gem end |
#include_negative? ⇒ boolean
Whether to include negative long flags
244 245 246 |
# File 'core-docs/toys/flag.rb', line 244 def include_negative? # Source available in the toys-core gem end |
#include_short? ⇒ boolean
Whether to include short flags
228 229 230 |
# File 'core-docs/toys/flag.rb', line 228 def include_short? # Source available in the toys-core gem end |