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



40
41
42
# File 'lib/response_mate/cli.rb', line 40

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

#inspect(*keys) ⇒ Object

rubocop:disable Lint/UnusedMethodArgument



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

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

#listObject

rubocop:disable Lint/UnusedMethodArgument



24
25
26
# File 'lib/response_mate/cli.rb', line 24

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

#recordObject



10
11
12
13
14
# File 'lib/response_mate/cli.rb', line 10

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



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

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