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, #FnJoin, #FnNot, #FnOr, #FnSelect, #Ref
Methods included from RefCheck
Constructor Details
#initialize(function, argument, refs = []) ⇒ Fn
Returns a new instance of Fn.
183 184 185 186 187 |
# File 'lib/cfndsl/jsonable.rb', line 183 def initialize(function, argument, refs = []) @function = function @argument = argument @_refs = refs end |
Instance Method Details
#as_json(_options = {}) ⇒ Object
189 190 191 192 193 |
# File 'lib/cfndsl/jsonable.rb', line 189 def as_json( = {}) hash = {} hash["Fn::#{@function}"] = @argument hash end |
#ref_children ⇒ Object
203 204 205 |
# File 'lib/cfndsl/jsonable.rb', line 203 def ref_children [@argument] end |
#references ⇒ Object
199 200 201 |
# File 'lib/cfndsl/jsonable.rb', line 199 def references @_refs end |
#to_json(*a) ⇒ Object
195 196 197 |
# File 'lib/cfndsl/jsonable.rb', line 195 def to_json(*a) as_json.to_json(*a) end |