Module: Aws::Cfn::DeCompiler::Options

Included in:
Base
Defined in:
lib/aws/cfn/decompiler/mixins/options.rb

Instance Method Summary collapse

Instance Method Details

#parse_optionsObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/aws/cfn/decompiler/mixins/options.rb', line 6

def parse_options
  # noinspection RubySuperCallWithoutSuperclassInspection
  setup_options

  @opts.on :F, :format=,        'The output format of the components. [JSON|YAML|Ruby]', { as: String, match: @format_regex, default: 'yaml' }
  @opts.on :s, :specification=, 'The specification file to create.', as: String

  @opts.parse!

  unless @opts[:directory]
    puts @opts
    abort! "Missing required option --directory"
  end

  unless @opts[:template]
    puts @opts
    abort! "Missing required option --template"
  end

end

#set_config_optionsObject



27
28
29
# File 'lib/aws/cfn/decompiler/mixins/options.rb', line 27

def set_config_options
  setup_config
end