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.
184 185 186 187 188 189 |
# File 'lib/cfndsl/jsonable.rb', line 184 def initialize(function, argument, refs = [], condition_refs = []) @function = function @argument = argument @_refs = refs @_condition_refs = condition_refs end |
Instance Method Details
#all_refs ⇒ Object
201 202 203 |
# File 'lib/cfndsl/jsonable.rb', line 201 def all_refs @_refs end |
#as_json(_options = {}) ⇒ Object
191 192 193 194 195 |
# File 'lib/cfndsl/jsonable.rb', line 191 def as_json( = {}) hash = {} hash["Fn::#{@function}"] = @argument hash end |
#condition_refs ⇒ Object
205 206 207 |
# File 'lib/cfndsl/jsonable.rb', line 205 def condition_refs @_condition_refs end |
#ref_children ⇒ Object
209 210 211 |
# File 'lib/cfndsl/jsonable.rb', line 209 def ref_children [@argument].flatten end |
#to_json(*args) ⇒ Object
197 198 199 |
# File 'lib/cfndsl/jsonable.rb', line 197 def to_json(*args) as_json.to_json(*args) end |