Class: CloudFormationTool::CLI::Compile

Inherits:
Clamp::Command
  • Object
show all
Defined in:
lib/cloud_formation_tool/cli/compile.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



8
9
10
11
12
13
14
15
# File 'lib/cloud_formation_tool/cli/compile.rb', line 8

def execute
  if file.end_with? '.init'
    puts CloudInit.new(file).compile
  else
    puts CloudFormation.parse(file).to_yaml
  #        raise CloudFormationTool::Errors::AppError.new("not a valid template file. Only .init and .yaml are supported")
  end
end