Class: AWSCDK::PropertyInjectors
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::PropertyInjectors
- Defined in:
- property_injectors.rb
Overview
This is a collection of ProjectInjectors assigned to this scope.
It is keyed by constructUniqueId. There can be only one ProjectInjector for a constructUniqueId.
Class Method Summary collapse
-
.has_property_injectors(x) ⇒ Boolean
Return whether the given object has a PropertyInjectors property.
- .jsii_overridable_methods ⇒ Object
-
.of(scope) ⇒ AWSCDK::PropertyInjectors
Returns the
PropertyInjectorsobject associated with a construct scope.
Instance Method Summary collapse
-
#_for(unique_id) ⇒ AWSCDK::IPropertyInjector?
Get the PropertyInjector that is registered to the Construct's uniqueId.
-
#add(*props_injectors) ⇒ void
Add a list of IPropertyInjectors to this collection of PropertyInjectors.
-
#initialize(*args) ⇒ PropertyInjectors
constructor
A new instance of PropertyInjectors.
-
#scope ⇒ Constructs::IConstruct
The scope attached to Injectors.
-
#supported_classes ⇒ Array<String>
This returns a list of the Constructs that are supporting by this PropertyInjectors.
Constructor Details
#initialize(*args) ⇒ PropertyInjectors
Returns a new instance of PropertyInjectors.
10 11 12 |
# File 'property_injectors.rb', line 10 def initialize(*args) raise NoMethodError, "aws-cdk-lib.PropertyInjectors does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.has_property_injectors(x) ⇒ Boolean
Return whether the given object has a PropertyInjectors property.
We do attribute detection since we can't reliably use 'instanceof'.
29 30 31 32 |
# File 'property_injectors.rb', line 29 def self.has_property_injectors(x) Jsii::Type.check_type(x, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "x") Jsii::Kernel.instance.call_static("aws-cdk-lib.PropertyInjectors", "hasPropertyInjectors", [x]) end |
.jsii_overridable_methods ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'property_injectors.rb', line 14 def self.jsii_overridable_methods { :scope => { kind: :property, name: "scope", is_optional: false }, :add => { kind: :method, name: "add", is_optional: false }, :_for => { kind: :method, name: "for", is_optional: false }, :supported_classes => { kind: :method, name: "supportedClasses", is_optional: false }, } end |
.of(scope) ⇒ AWSCDK::PropertyInjectors
Returns the PropertyInjectors object associated with a construct scope.
If PropertyInjectors object doesn't exist on this scope, then it creates one and attaches it to scope.
40 41 42 43 |
# File 'property_injectors.rb', line 40 def self.of(scope) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklDb25zdHJ1Y3QifQ==")), "scope") Jsii::Kernel.instance.call_static("aws-cdk-lib.PropertyInjectors", "of", [scope]) end |
Instance Method Details
#_for(unique_id) ⇒ AWSCDK::IPropertyInjector?
Get the PropertyInjector that is registered to the Construct's uniqueId.
67 68 69 70 |
# File 'property_injectors.rb', line 67 def _for(unique_id) Jsii::Type.check_type(unique_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "uniqueId") jsii_call_method("for", [unique_id]) end |
#add(*props_injectors) ⇒ void
This method returns an undefined value.
Add a list of IPropertyInjectors to this collection of PropertyInjectors.
56 57 58 59 60 61 |
# File 'property_injectors.rb', line 56 def add(*props_injectors) props_injectors.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JUHJvcGVydHlJbmplY3RvciJ9")), "propsInjectors[#{index}]") end jsii_call_method("add", [*props_injectors]) end |
#scope ⇒ Constructs::IConstruct
The scope attached to Injectors.
48 49 50 |
# File 'property_injectors.rb', line 48 def scope() jsii_get_property("scope") end |
#supported_classes ⇒ Array<String>
This returns a list of the Constructs that are supporting by this PropertyInjectors.
75 76 77 |
# File 'property_injectors.rb', line 75 def supported_classes() jsii_call_method("supportedClasses", []) end |