lib/cfer/core/stack.rb in cfer-0.5.0 vs lib/cfer/core/stack.rb in cfer-0.6.0
- old
+ new
@@ -153,10 +153,14 @@
end
# Renders the stack into a CloudFormation template.
# @return [String] The final template
def to_cfn
- to_h.to_json
+ if @options[:pretty_print]
+ JSON.pretty_generate(to_h)
+ else
+ to_h.to_json
+ end
end
# Gets the Cfn client, if one exists, or throws an error if one does not
def client
@options[:client] || raise(Cfer::Util::CferError, "Stack has no associated client.")