Method: Cfer::Groups::ResourceGroup#initialize

Defined in:
lib/cfer/groups/resource_group.rb

#initialize(name, type, stack, **options, &block) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/cfer/groups/resource_group.rb', line 6

def initialize(name, type, stack, **options, &block)
  @group_name = name
  @resource_type = type
  options = { DependsOn: [] }.merge(options)

  super name, "AWS::CloudFormation::WaitConditionHandle", stack, options do
    self.instance_exec &block if block
    self[:Metadata] = {
      Type: type,
      Properties: self[:Properties]
    }
  end

  Docile.dsl_eval self, self[:Properties] do
    self.instance_exec self[:Properties], &self.class.block if self.class.block
  end
  self[:Properties] = {}
end