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
#declare, #incorrect_capitalization?, #method_missing, #titleize
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
202 203 204 205 206 |
# File 'lib/cfndsl/JSONable.rb', line 202 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
214 215 216 |
# File 'lib/cfndsl/JSONable.rb', line 214 def get_references() return @_refs end |
#ref_children ⇒ Object
218 219 220 |
# File 'lib/cfndsl/JSONable.rb', line 218 def ref_children return [@argument] end |
#to_json(*a) ⇒ Object
208 209 210 211 212 |
# File 'lib/cfndsl/JSONable.rb', line 208 def to_json(*a) hash = {} hash["Fn::#{@function}"] = @argument hash.to_json(*a) end |