Class: Constructs::DependencyGroup

Inherits:
Jsii::Object
  • Object
show all
Includes:
IDependable
Defined in:
dependency_group.rb

Overview

A set of constructs to be used as a dependable.

This class can be used when a set of constructs which are disjoint in the construct tree needs to be combined to be used as a single dependable.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*deps, &jsii_block) ⇒ DependencyGroup

Returns a new instance of DependencyGroup.

Parameters:



13
14
15
16
17
18
# File 'dependency_group.rb', line 13

def initialize(*deps, &jsii_block)
  deps.each_with_index do |item, index|
    Jsii::Type.check_type(item, "eyJmcW4iOiJjb25zdHJ1Y3RzLklEZXBlbmRhYmxlIn0=", "deps[#{index}]")
  end
  Jsii::Object.instance_method(:initialize).bind(self).call(*deps, &jsii_block)
end

Class Method Details

.jsii_overridable_methodsObject



20
21
22
23
24
# File 'dependency_group.rb', line 20

def self.jsii_overridable_methods
  {
    :add => { kind: :method, name: "add", is_optional: false },
  }
end

Instance Method Details

#add(*scopes) ⇒ void

This method returns an undefined value.

Add a construct to the dependency roots.

Parameters:



30
31
32
33
34
35
# File 'dependency_group.rb', line 30

def add(*scopes)
  scopes.each_with_index do |item, index|
    Jsii::Type.check_type(item, "eyJmcW4iOiJjb25zdHJ1Y3RzLklEZXBlbmRhYmxlIn0=", "scopes[#{index}]")
  end
  jsii_call_method("add", [*scopes])
end