Class: MkStack::IntrinsicShort

Inherits:
Object
  • Object
show all
Defined in:
lib/mkstack/template.rb

Overview

A class to represent undefined local tags.

CloudFormation uses ! to denote the YAML short form of intrinsic functions, which is the same prefix YAML uses for local tags. The default handler strips undefined local tags, leaving just the value.

Loading a YAML file will force the output to be in YAML format.

Instance Method Summary collapse

Instance Method Details

#encode_with(coder) ⇒ Object



23
24
25
26
27
28
29
# File 'lib/mkstack/template.rb', line 23

def encode_with(coder)
  coder.tag = @coder.tag

  coder.map = @coder.map if @coder.type == :map
  coder.scalar = @coder.scalar if @coder.type == :scalar
  coder.seq = @coder.seq if @coder.type == :seq
end

#init_with(coder) ⇒ Object



19
20
21
# File 'lib/mkstack/template.rb', line 19

def init_with(coder)
  @coder = coder
end