Class: Aws::Cfn::Yats::Json2Yaml
- Inherits:
-
Base
- Object
- Base
- Aws::Cfn::Yats::Json2Yaml
show all
- Defined in:
- lib/aws/cfn/yats/json2yaml.rb
Instance Method Summary
collapse
Methods inherited from Base
abstract_methods, #initialize, #pprint, #simplify, #transform
Instance Method Details
#pprint_cfn_resource(name, options) ⇒ Object
18
19
20
|
# File 'lib/aws/cfn/yats/json2yaml.rb', line 18
def pprint_cfn_resource(name, options)
pprint_value({ name => options })
end
|
#pprint_cfn_section(section, name, options) ⇒ Object
14
15
16
|
# File 'lib/aws/cfn/yats/json2yaml.rb', line 14
def pprint_cfn_section(section, name, options)
pprint_value(section)
end
|
#pprint_cfn_template(tpl) ⇒ Object
10
11
12
|
# File 'lib/aws/cfn/yats/json2yaml.rb', line 10
def pprint_cfn_template(tpl)
pprint_value(tpl)
end
|
#pprint_value(val, indent = "\t") ⇒ Object
22
23
24
25
26
|
# File 'lib/aws/cfn/yats/json2yaml.rb', line 22
def pprint_value(val, indent="\t")
yml = YAML::dump(val)
puts yml
end
|