Class: Ppl::Command::Completion
- Inherits:
-
Application::Command
- Object
- Application::Command
- Ppl::Command::Completion
- Defined in:
- lib/ppl/command/completion.rb
Instance Attribute Summary collapse
-
#completions_directory ⇒ Object
writeonly
Sets the attribute completions_directory.
Attributes inherited from Application::Command
Instance Method Summary collapse
Methods inherited from Application::Command
Instance Attribute Details
#completions_directory=(value) ⇒ Object (writeonly)
Sets the attribute completions_directory
6 7 8 |
# File 'lib/ppl/command/completion.rb', line 6 def completions_directory=(value) @completions_directory = value end |
Instance Method Details
#execute(input, output) ⇒ Object
12 13 14 15 16 |
# File 'lib/ppl/command/completion.rb', line 12 def execute(input, output) shell_name = require_shell_name(input) location = require_completion_existence(shell_name) output.line(File.read(location)) end |
#options(parser, options) ⇒ Object
8 9 10 |
# File 'lib/ppl/command/completion.rb', line 8 def (parser, ) parser. = "usage: ppl completion <shell>" end |