Class: Humidifier::Fn

Inherits:
Object
  • Object
show all
Defined in:
lib/humidifier/fn.rb

Overview

Builds CFN function calls

Constant Summary collapse

FUNCTIONS =

The list of all internal functions provided by AWS from docs.aws.amazon.com

/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html
Utils.underscored(%w[And Base64 Equals FindInMap GetAtt GetAZs
If ImportValue Join Not Or Select Sub])

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value) ⇒ Fn

Returns a new instance of Fn.



14
15
16
17
# File 'lib/humidifier/fn.rb', line 14

def initialize(name, value)
  @name = "Fn::#{name}"
  @value = value
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



12
13
14
# File 'lib/humidifier/fn.rb', line 12

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



12
13
14
# File 'lib/humidifier/fn.rb', line 12

def value
  @value
end

Instance Method Details

#to_cfObject

CFN stack syntax



20
21
22
# File 'lib/humidifier/fn.rb', line 20

def to_cf
  { name => Serializer.dump(value) }
end