Class: CfnDsl::Fn
Overview
- Handles all of the Fn
-
objects
Constant Summary
Constants included from Functions
CfnDsl::Functions::FN_SUB_SCANNER
Instance Method Summary collapse
- #all_refs ⇒ Object
- #as_json(_options = {}) ⇒ Object
- #condition_refs ⇒ Object
-
#initialize(function, argument, refs = [], condition_refs = []) ⇒ Fn
constructor
A new instance of Fn.
- #ref_children ⇒ Object
- #to_json(*args) ⇒ Object
Methods inherited from JSONable
#declare, #external_parameters, external_parameters
Methods included from Functions
#FnAnd, #FnBase64, #FnCidr, #FnEquals, #FnFindInMap, #FnGetAZs, #FnGetAtt, #FnIf, #FnImportValue, #FnJoin, #FnNot, #FnOr, #FnSelect, #FnSplit, #FnSub, #Ref
Methods included from RefCheck
Constructor Details
#initialize(function, argument, refs = [], condition_refs = []) ⇒ Fn
Returns a new instance of Fn.
183 184 185 186 187 188 |
# File 'lib/cfndsl/jsonable.rb', line 183 def initialize(function, argument, refs = [], condition_refs = []) @function = function @argument = argument @_refs = refs @_condition_refs = condition_refs end |
Instance Method Details
#all_refs ⇒ Object
200 201 202 |
# File 'lib/cfndsl/jsonable.rb', line 200 def all_refs @_refs end |
#as_json(_options = {}) ⇒ Object
190 191 192 193 194 |
# File 'lib/cfndsl/jsonable.rb', line 190 def as_json( = {}) hash = {} hash["Fn::#{@function}"] = @argument hash end |
#condition_refs ⇒ Object
204 205 206 |
# File 'lib/cfndsl/jsonable.rb', line 204 def condition_refs @_condition_refs end |
#ref_children ⇒ Object
208 209 210 |
# File 'lib/cfndsl/jsonable.rb', line 208 def ref_children [@argument].flatten end |
#to_json(*args) ⇒ Object
196 197 198 |
# File 'lib/cfndsl/jsonable.rb', line 196 def to_json(*args) as_json.to_json(*args) end |