Class: ReqWrap::Cli::Environment
- Inherits:
-
Object
- Object
- ReqWrap::Cli::Environment
- Defined in:
- lib/req_wrap/cli/environment.rb
Constant Summary collapse
- DEFAULT_EDITOR =
'vi'
Instance Method Summary collapse
-
#call(args) ⇒ Object
rubocop:disable Metrics/MethodLength.
-
#initialize ⇒ Environment
constructor
A new instance of Environment.
Constructor Details
#initialize ⇒ Environment
Returns a new instance of Environment.
12 13 14 15 16 |
# File 'lib/req_wrap/cli/environment.rb', line 12 def initialize = { delete_original: false } end |
Instance Method Details
#call(args) ⇒ Object
rubocop:disable Metrics/MethodLength
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/req_wrap/cli/environment.rb', line 18 def call(args) # rubocop:disable Metrics/MethodLength parser = OptionParser.new() do |p| add_gen_pass_option(p) add_enc_option(p) add_change_option(p) add_delete_original_option(p) add_decrypt_option(p) p.separator('') p.separator(examples) end return parser.parse!(args) unless args.empty? puts parser exit(1) end |