Class: ResponseMate::CLI

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

Overview

Entry point of the command-line interface

Instance Method Summary collapse

Instance Method Details

#exportObject


50
51
52
# File 'lib/response_mate/cli.rb', line 50

def export
  ResponseMate::Commands::Export.new(args, options).run
end

#inspect(*keys) ⇒ Object

rubocop:disable Lint/UnusedMethodArgument


22
23
24
# File 'lib/response_mate/cli.rb', line 22

def inspect(*keys) # rubocop:disable Lint/UnusedMethodArgument
  ResponseMate::Commands::Inspect.new(args, options).run
end

#listObject

rubocop:disable Lint/UnusedMethodArgument


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

def list # rubocop:disable Lint/UnusedMethodArgument
  ResponseMate::Commands::List.new(args, options).run
end

#recordObject


13
14
15
16
17
# File 'lib/response_mate/cli.rb', line 13

def record
  ResponseMate::Commands::Record.new(args, options).run
rescue ResponseMate::KeysNotFound => e
  puts "The requested keys: #{e.message} could not be found"
end

#versionObject


34
35
36
# File 'lib/response_mate/cli.rb', line 34

def version
  puts "response_mate version #{ResponseMate::VERSION}"
end