Class: ResponseMate::Commands::List

Inherits:
Base
  • Object
show all
Defined in:
lib/response_mate/commands/list.rb

Overview

Command which performs the operations required by ‘response_mate list`

Instance Attribute Summary

Attributes inherited from Base

#args, #options

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from ResponseMate::Commands::Base

Instance Method Details

#runObject

Run the command based on args, options provided



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/response_mate/commands/list.rb', line 4

def run # rubocop:disable Metrics/AbcSize
  environment = ResponseMate::Environment.new(options[:environment])
  options[:manifest] = ResponseMate::Manifest.new(options[:requests_manifest],
                                                  environment)

  puts available_keys.join("\n") << "\n\n"
  action = ask_action

  return if action == :no

  perform_action(action, ask_key(available_keys))
end