Class: CfnDsl::Fn

Inherits:
JSONable show all
Defined in:
lib/cfndsl.rb

Instance Method Summary collapse

Methods inherited from JSONable

#declare

Methods included from Functions

#FnBase64, #FnFindInMap, #FnFormat, #FnGetAZs, #FnGetAtt, #FnJoin, #Ref

Methods included from RefCheck

#references

Constructor Details

#initialize(function, argument, refs = []) ⇒ Fn

Handles all of the Fn

objects



239
240
241
242
243
# File 'lib/cfndsl.rb', line 239

def initialize( function, argument, refs=[] )
  @function = function
  @argument = argument
  @_refs = refs
end

Instance Method Details

#get_referencesObject



251
252
253
# File 'lib/cfndsl.rb', line 251

def get_references()
  return @_refs
end

#ref_childrenObject



255
256
257
# File 'lib/cfndsl.rb', line 255

def ref_children
  return [@argument]
end

#to_json(*a) ⇒ Object



245
246
247
248
249
# File 'lib/cfndsl.rb', line 245

def to_json(*a)
  hash = {}
  hash["Fn::#{@function}"] = @argument
  hash.to_json(*a)
end