Class: CfnDsl::ResourceDefinition

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

Overview

Handles Resource objects

Instance Method Summary collapse

Methods inherited from JSONable

#as_json, #declare, #external_parameters, external_parameters, #ref_children, #to_json

Methods included from Functions

#FnAnd, #FnBase64, #FnCidr, #FnEquals, #FnFindInMap, #FnFormat, #FnGetAZs, #FnGetAtt, #FnIf, #FnImportValue, #FnJoin, #FnNot, #FnOr, #FnSelect, #FnSplit, #FnSub, #Ref

Methods included from RefCheck

#build_references, #ref_children

Instance Method Details

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



17
18
19
20
21
22
23
# File 'lib/cfndsl/resources.rb', line 17

def add_tag(name, value, propagate = nil)
  send(:Tag) do
    Key name
    Value value
    PropagateAtLaunch propagate unless propagate.nil?
  end
end

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



13
14
15
# File 'lib/cfndsl/resources.rb', line 13

def addTag(name, value, propagate = nil)
  add_tag(name, value, propagate)
end

#all_refsObject



25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/cfndsl/resources.rb', line 25

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

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

  refs
end