Class: Convection::Model::Template::Output
- Inherits:
-
Object
- Object
- Convection::Model::Template::Output
- Includes:
- DSL::Helpers, Mixin::Conditional
- Defined in:
- lib/convection/model/template/output.rb
Overview
Resource
Instance Attribute Summary collapse
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(name, parent) ⇒ Output
constructor
A new instance of Output.
- #render ⇒ Object
Methods included from Mixin::Conditional
Methods included from DSL::Helpers
#camel_case, included, method_name, #screaming_snake_case, #snake_case
Methods included from DSL::IntrinsicFunctions
#base64, #find_in_map, #fn_and, #fn_equals, #fn_if, #fn_not, #fn_or, #fn_ref, #get_att, #get_azs, #join, #select
Constructor Details
#initialize(name, parent) ⇒ Output
Returns a new instance of Output
20 21 22 23 24 25 26 |
# File 'lib/convection/model/template/output.rb', line 20 def initialize(name, parent) @name = name @template = parent.template @type = '' @properties = {} end |
Instance Attribute Details
#template ⇒ Object (readonly)
Returns the value of attribute template
18 19 20 |
# File 'lib/convection/model/template/output.rb', line 18 def template @template end |
Instance Method Details
#render ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/convection/model/template/output.rb', line 28 def render { 'Value' => value.respond_to?(:render) ? value.render : value, 'Description' => description }.tap do |output| render_condition(output) end end |