Module: Moonshot::Commands::TagArguments
Instance Method Summary collapse
Instance Method Details
#parser ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/moonshot/commands/tag_arguments.rb', line 6 def parser parser = super parser.on('--tag KEY=VALUE', '-TKEY=VALUE', 'Specify Stack Tag on the command line') do |v| data = v.split('=', 2) unless data.size == 2 raise "Invalid tag format '#{v}', expected KEY=VALUE (e.g. MyStackTag=12)" end Moonshot.config. << { key: data[0], value: data[1] } end end |