Class: Convection::Model::Template::Condition

Inherits:
Object
  • Object
show all
Includes:
DSL::Helpers
Defined in:
lib/convection/model/template/condition.rb

Defined Under Namespace

Classes: ConditionalFunction

Constant Summary

CONDITIONAL_FUNCTION_SYNTAX_MAP =
{ fn_and: 'Fn::And',
fn_equals: 'Fn::Equals',
fn_if: 'Fn::If',
fn_not: 'Fn::Not',
fn_or: 'Fn::Or' }.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

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) ⇒ Condition

Returns a new instance of Condition



25
26
27
28
# File 'lib/convection/model/template/condition.rb', line 25

def initialize(name, parent)
  @name = name
  @template = parent.template
end

Instance Attribute Details

#conditionObject (readonly)

Returns the value of attribute condition



16
17
18
# File 'lib/convection/model/template/condition.rb', line 16

def condition
  @condition
end

#templateObject (readonly)

Returns the value of attribute template



17
18
19
# File 'lib/convection/model/template/condition.rb', line 17

def template
  @template
end

Instance Method Details

#renderObject



30
31
32
# File 'lib/convection/model/template/condition.rb', line 30

def render
  condition.render
end