Class: AWSCDK::PropertyMergeStrategy
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::PropertyMergeStrategy
- Defined in:
- property_merge_strategy.rb
Overview
Strategy for handling nested properties in L1 property mixins.
Class Method Summary collapse
-
.combine(options = nil) ⇒ AWSCDK::IMergeStrategy
Deep merges nested objects from source into target.
- .jsii_overridable_methods ⇒ Object
-
.override ⇒ AWSCDK::IMergeStrategy
Replaces existing property values on the target with the values from the source.
Instance Method Summary collapse
-
#initialize(*args) ⇒ PropertyMergeStrategy
constructor
A new instance of PropertyMergeStrategy.
Constructor Details
#initialize(*args) ⇒ PropertyMergeStrategy
Returns a new instance of PropertyMergeStrategy.
8 9 10 |
# File 'property_merge_strategy.rb', line 8 def initialize(*args) raise NoMethodError, "aws-cdk-lib.PropertyMergeStrategy does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.combine(options = nil) ⇒ AWSCDK::IMergeStrategy
Deep merges nested objects from source into target.
When both the existing and new value for a key are plain objects, their properties are merged recursively. Primitives, arrays, and mismatched types are overridden by the source value.
Supports Box-backed values: when the target value is a Box, the merge is deferred until the Box resolves.
28 29 30 31 32 |
# File 'property_merge_strategy.rb', line 28 def self.combine( = nil) = .is_a?(Hash) ? ::AWSCDK::CombineStrategyOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5Db21iaW5lU3RyYXRlZ3lPcHRpb25zIn0=")), "options") unless .nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.PropertyMergeStrategy", "combine", []) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 |
# File 'property_merge_strategy.rb', line 12 def self.jsii_overridable_methods { } end |
.override ⇒ AWSCDK::IMergeStrategy
Replaces existing property values on the target with the values from the source.
Each allowed key is copied from source to target as-is, without inspecting nested objects. Any previous value on the target is discarded.
40 41 42 |
# File 'property_merge_strategy.rb', line 40 def self.override() Jsii::Kernel.instance.call_static("aws-cdk-lib.PropertyMergeStrategy", "override", []) end |