Class: Convection::Model::Template::Output

Inherits:
Object
  • Object
show all
Includes:
DSL::Helpers, Mixin::Conditional
Defined in:
lib/convection/model/template/output.rb

Overview

Resource

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Mixin::Conditional

#condition, #render_condition

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

#templateObject (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

#renderObject



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