Class: Toys::Flag::DefaultCompletion
- Inherits:
-
Completion::Base
- Object
- Completion::Base
- Toys::Flag::DefaultCompletion
- Defined in:
- core-docs/toys/flag.rb
Overview
Defined in the toys-core gem
A Completion that returns all possible flags associated with a Toys::Flag.
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.
219 220 221 |
# File 'core-docs/toys/flag.rb', line 219 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.
254 255 256 |
# File 'core-docs/toys/flag.rb', line 254 def call(context) # Source available in the toys-core gem end |
#include_long? ⇒ Boolean
Whether to include long flags
235 236 237 |
# File 'core-docs/toys/flag.rb', line 235 def include_long? # Source available in the toys-core gem end |
#include_negative? ⇒ Boolean
Whether to include negative long flags
243 244 245 |
# File 'core-docs/toys/flag.rb', line 243 def include_negative? # Source available in the toys-core gem end |
#include_short? ⇒ Boolean
Whether to include short flags
227 228 229 |
# File 'core-docs/toys/flag.rb', line 227 def include_short? # Source available in the toys-core gem end |