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
#FnAnd, #FnBase64, #FnEquals, #FnFindInMap, #FnFormat, #FnGetAZs, #FnGetAtt, #FnIf, #FnJoin, #FnNot, #FnOr, #FnSelect, #Ref
Methods included from RefCheck
Constructor Details
#initialize(function, argument, refs = []) ⇒ Fn
- Handles all of the Fn
-
objects
193 194 195 196 197 |
# File 'lib/cfndsl/JSONable.rb', line 193 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
205 206 207 |
# File 'lib/cfndsl/JSONable.rb', line 205 def get_references() return @_refs end |
#ref_children ⇒ Object
209 210 211 |
# File 'lib/cfndsl/JSONable.rb', line 209 def ref_children return [@argument] end |
#to_json(*a) ⇒ Object
199 200 201 202 203 |
# File 'lib/cfndsl/JSONable.rb', line 199 def to_json(*a) hash = {} hash["Fn::#{@function}"] = @argument hash.to_json(*a) end |