Class: CfnDsl::Fn
Instance Method Summary collapse
- #get_references ⇒ Object
-
#initialize(function, argument, refs = []) ⇒ Fn
constructor
- Handles all of the Fn
-
objects.
- #ref_children ⇒ Object
- #to_json(*a) ⇒ Object
Methods inherited from JSONable
Methods included from Functions
#FnBase64, #FnFindInMap, #FnFormat, #FnGetAZs, #FnGetAtt, #FnJoin, #Ref
Methods included from RefCheck
Constructor Details
#initialize(function, argument, refs = []) ⇒ Fn
- Handles all of the Fn
-
objects
151 152 153 154 155 |
# File 'lib/cfndsl/JSONable.rb', line 151 def initialize( function, argument, refs=[] ) @function = function @argument = argument @_refs = refs end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CfnDsl::JSONable
Instance Method Details
#get_references ⇒ Object
163 164 165 |
# File 'lib/cfndsl/JSONable.rb', line 163 def get_references() return @_refs end |
#ref_children ⇒ Object
167 168 169 |
# File 'lib/cfndsl/JSONable.rb', line 167 def ref_children return [@argument] end |
#to_json(*a) ⇒ Object
157 158 159 160 161 |
# File 'lib/cfndsl/JSONable.rb', line 157 def to_json(*a) hash = {} hash["Fn::#{@function}"] = @argument hash.to_json(*a) end |