Class: CfnDsl::ResourceDefinition

Inherits:
JSONable
  • Object
show all
Defined in:
lib/cfndsl/Resources.rb

Instance Method Summary collapse

Methods inherited from JSONable

#declare, #incorrect_capitalization?, #method_missing, #ref_children, #titleize, #to_json

Methods included from Functions

#FnAnd, #FnBase64, #FnEquals, #FnFindInMap, #FnFormat, #FnGetAZs, #FnGetAtt, #FnIf, #FnJoin, #FnNot, #FnOr, #FnSelect, #Ref

Methods included from RefCheck

#ref_children, #references

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class CfnDsl::JSONable

Instance Method Details

#addTag(name, value, propagate = nil) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/cfndsl/Resources.rb', line 13

def addTag(name, value, propagate=nil)
  self.send(:Tag) {
    Key name
    Value value
    PropagateAtLaunch propagate unless propagate.nil?
  }
end

#get_referencesObject



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/cfndsl/Resources.rb', line 21

def get_references()
  refs = []
  if @DependsOn then
    if( @DependsOn.respond_to?(:each) ) then
      @DependsOn.each do |dep|
        refs.push dep
      end
    end

    if( @DependsOn.instance_of?(String) ) then
      refs.push @DependsOn
    end
  end
  refs
end