Class: Toys::Completion::FileSystem
- Defined in:
- core-docs/toys/completion.rb
Overview
A Completion that returns candidates from the local file system.
Defined in the toys-core gem
Instance Attribute Summary collapse
-
#cwd ⇒ String
readonly
Path to the starting directory.
-
#include_directories ⇒ boolean
readonly
Whether directories are included in the completion candidates.
-
#include_files ⇒ boolean
readonly
Whether files are included in the completion candidates.
Instance Method Summary collapse
-
#call(context) ⇒ Array<Toys::Completion::Candidate>
Returns candidates for the current completion.
-
#initialize(cwd: nil, omit_files: false, omit_directories: false) ⇒ FileSystem
constructor
Create a completion that gets candidates from names in the local file system.
Constructor Details
#initialize(cwd: nil, omit_files: false, omit_directories: false) ⇒ FileSystem
Create a completion that gets candidates from names in the local file system.
223 224 225 |
# File 'core-docs/toys/completion.rb', line 223 def initialize(cwd: nil, omit_files: false, omit_directories: false) # Source available in the toys-core gem end |
Instance Attribute Details
#cwd ⇒ String (readonly)
Path to the starting directory.
243 244 245 |
# File 'core-docs/toys/completion.rb', line 243 def cwd @cwd end |
#include_directories ⇒ boolean (readonly)
Whether directories are included in the completion candidates.
237 238 239 |
# File 'core-docs/toys/completion.rb', line 237 def include_directories @include_directories end |
#include_files ⇒ boolean (readonly)
Whether files are included in the completion candidates.
231 232 233 |
# File 'core-docs/toys/completion.rb', line 231 def include_files @include_files end |
Instance Method Details
#call(context) ⇒ Array<Toys::Completion::Candidate>
Returns candidates for the current completion.
252 253 254 |
# File 'core-docs/toys/completion.rb', line 252 def call(context) # Source available in the toys-core gem end |