Class: CfnDsl::Fn
Overview
- Handles all of the Fn
-
objects
Instance Method Summary collapse
- #as_json(_options = {}) ⇒ Object
-
#initialize(function, argument, refs = []) ⇒ Fn
constructor
A new instance of Fn.
- #ref_children ⇒ Object
- #references ⇒ Object
- #to_json(*a) ⇒ Object
Methods inherited from JSONable
#declare, #external_parameters, external_parameters
Methods included from Functions
#FnAnd, #FnBase64, #FnEquals, #FnFindInMap, #FnFormat, #FnGetAZs, #FnGetAtt, #FnIf, #FnImportValue, #FnJoin, #FnNot, #FnOr, #FnSelect, #FnSub, #Ref
Methods included from RefCheck
Constructor Details
#initialize(function, argument, refs = []) ⇒ Fn
Returns a new instance of Fn.
200 201 202 203 204 |
# File 'lib/cfndsl/jsonable.rb', line 200 def initialize(function, argument, refs = []) @function = function @argument = argument @_refs = refs end |
Instance Method Details
#as_json(_options = {}) ⇒ Object
206 207 208 209 210 |
# File 'lib/cfndsl/jsonable.rb', line 206 def as_json( = {}) hash = {} hash["Fn::#{@function}"] = @argument hash end |
#ref_children ⇒ Object
220 221 222 |
# File 'lib/cfndsl/jsonable.rb', line 220 def ref_children [@argument] end |
#references ⇒ Object
216 217 218 |
# File 'lib/cfndsl/jsonable.rb', line 216 def references @_refs end |
#to_json(*a) ⇒ Object
212 213 214 |
# File 'lib/cfndsl/jsonable.rb', line 212 def to_json(*a) as_json.to_json(*a) end |