Class: CodeSnippet::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/code_snippet/cli.rb

Overview

Command line interface helpers and actions

Instance Method Summary collapse

Instance Method Details

#listObject

Show snippet command



62
63
64
65
# File 'lib/code_snippet/cli.rb', line 62

def list
  cmd = CodeSnippet::Commands::ListSnippets.new(manager, options)
  cmd.run
end

#pathObject

Runs version command



29
30
31
32
# File 'lib/code_snippet/cli.rb', line 29

def path
  cmd = CodeSnippet::Commands::PrintPath.new(snip_dir, options)
  cmd.run
end

#showObject

Show snippet command



52
53
54
55
# File 'lib/code_snippet/cli.rb', line 52

def show
  cmd = CodeSnippet::Commands::ShowSnippet.new(manager, options)
  cmd.run
end

#versionObject

Runs version command



17
18
19
20
# File 'lib/code_snippet/cli.rb', line 17

def version
  cmd = CodeSnippet::Commands::PrintVersion.new(options)
  cmd.run
end