Class: CodeSnippet::CLI
- Inherits:
-
Thor
- Object
- Thor
- CodeSnippet::CLI
- Defined in:
- lib/code_snippet/cli.rb
Overview
Command line interface helpers and actions
Instance Method Summary collapse
-
#list ⇒ Object
Show snippet command.
-
#path ⇒ Object
Runs version command.
-
#show ⇒ Object
Show snippet command.
-
#version ⇒ Object
Runs version command.
Instance Method Details
#list ⇒ Object
Show snippet command
62 63 64 65 |
# File 'lib/code_snippet/cli.rb', line 62 def list cmd = CodeSnippet::Commands::ListSnippets.new(manager, ) cmd.run end |
#path ⇒ Object
Runs version command
29 30 31 32 |
# File 'lib/code_snippet/cli.rb', line 29 def path cmd = CodeSnippet::Commands::PrintPath.new(snip_dir, ) cmd.run end |
#show ⇒ Object
Show snippet command
52 53 54 55 |
# File 'lib/code_snippet/cli.rb', line 52 def show cmd = CodeSnippet::Commands::ShowSnippet.new(manager, ) cmd.run end |
#version ⇒ Object
Runs version command
17 18 19 20 |
# File 'lib/code_snippet/cli.rb', line 17 def version cmd = CodeSnippet::Commands::PrintVersion.new() cmd.run end |