Class: ExpressionEvaluator
- Inherits:
-
Object
- Object
- ExpressionEvaluator
- Defined in:
- lib/cfn-model/parser/expression_evaluator.rb
Constant Summary collapse
- FN_IF =
'Fn::If'
Instance Method Summary collapse
-
#evaluate(expression, conditions) ⇒ Object
href="Condition,X,Y">Fn::If’=> returns X if conditions doesn’t include Condition, otherwise it return X or Y depending.
Instance Method Details
#evaluate(expression, conditions) ⇒ Object
href="Condition,X,Y">Fn::If’=> returns X if conditions doesn’t include Condition, otherwise it return X or Y depending
Other than Fn::If, it just returns the value itself
8 9 10 11 12 13 14 |
# File 'lib/cfn-model/parser/expression_evaluator.rb', line 8 def evaluate(expression, conditions) if if_condition?(expression) outcome(expression, conditions) else expression end end |