Class: Constructs::DependencyGroup
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- Constructs::DependencyGroup
- 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
-
#add(*scopes) ⇒ void
Add a construct to the dependency roots.
-
#initialize(*deps, &jsii_block) ⇒ DependencyGroup
constructor
A new instance of DependencyGroup.
Constructor Details
#initialize(*deps, &jsii_block) ⇒ DependencyGroup
Returns a new instance of DependencyGroup.
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_methods ⇒ Object
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.
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 |