Class: Github::Auth::CLI

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

Overview

Command Line Interface for parsing and executing commands

Instance Method Summary collapse

Instance Method Details

#addObject



26
27
28
29
30
# File 'lib/github/auth/cli.rb', line 26

def add
  on_keys_file :write!,
    "Adding #{keys.count} key(s) to '#{keys_file.path}'",
    { command: options[:command] }
end

#listObject



55
56
57
# File 'lib/github/auth/cli.rb', line 55

def list
  rescue_keys_file_errors { puts keys_file.github_users.join(' ') }
end

#removeObject



42
43
44
45
# File 'lib/github/auth/cli.rb', line 42

def remove
  on_keys_file :delete!,
    "Removing #{keys.count} key(s) from '#{keys_file.path}'"
end

#versionObject



60
61
62
# File 'lib/github/auth/cli.rb', line 60

def version
  puts Github::Auth::VERSION
end