Class: CfnDsl::Fn
Overview
- Handles all of the Fn
-
objects
Instance Method Summary
collapse
Methods inherited from JSONable
#declare, #external_parameters, external_parameters
Methods included from Functions
#FnAnd, #FnBase64, #FnCidr, #FnEquals, #FnFindInMap, #FnFormat, #FnGetAZs, #FnGetAtt, #FnIf, #FnImportValue, #FnJoin, #FnNot, #FnOr, #FnSelect, #FnSplit, #FnSub, #Ref
Methods included from RefCheck
#build_references
Constructor Details
#initialize(function, argument, refs = []) ⇒ Fn
206
207
208
209
210
|
# File 'lib/cfndsl/jsonable.rb', line 206
def initialize(function, argument, refs = [])
@function = function
@argument = argument
@_refs = refs
end
|
Instance Method Details
#as_json(_options = {}) ⇒ Object
212
213
214
215
216
|
# File 'lib/cfndsl/jsonable.rb', line 212
def as_json(_options = {})
hash = {}
hash["Fn::#{@function}"] = @argument
hash
end
|
#ref_children ⇒ Object
226
227
228
|
# File 'lib/cfndsl/jsonable.rb', line 226
def ref_children
[@argument]
end
|
#references ⇒ Object
222
223
224
|
# File 'lib/cfndsl/jsonable.rb', line 222
def references
@_refs
end
|
#to_json(*args) ⇒ Object
218
219
220
|
# File 'lib/cfndsl/jsonable.rb', line 218
def to_json(*args)
as_json.to_json(*args)
end
|