Class: Toys::Completion::Enum
Overview
A Completion whose candidates come from a static list of strings.
Defined in the toys-core gem
Instance Attribute Summary collapse
-
#values ⇒ Array<Toys::Completion::Candidate>
readonly
The array of completion candidates.
Instance Method Summary collapse
-
#call(context) ⇒ Array<Toys::Completion::Candidate>
Returns candidates for the current completion.
-
#initialize(values) ⇒ Enum
constructor
Create a completion from a list of values.
Constructor Details
#initialize(values) ⇒ Enum
Create a completion from a list of values.
268 269 270 |
# File 'core-docs/toys/completion.rb', line 268 def initialize(values) # Source available in the toys-core gem end |
Instance Attribute Details
#values ⇒ Array<Toys::Completion::Candidate> (readonly)
The array of completion candidates.
276 277 278 |
# File 'core-docs/toys/completion.rb', line 276 def values @values end |
Instance Method Details
#call(context) ⇒ Array<Toys::Completion::Candidate>
Returns candidates for the current completion.
285 286 287 |
# File 'core-docs/toys/completion.rb', line 285 def call(context) # Source available in the toys-core gem end |