Class: AWSCDK::ResolveOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ResolveOptions
- Defined in:
- resolve_options.rb
Overview
Options to the resolve() operation.
NOT the same as the ResolveContext; ResolveContext is exposed to Token implementors and resolution hooks, whereas this struct is just to bundle a number of things that would otherwise be arguments to resolve() in a readable way.
Instance Attribute Summary collapse
-
#preparing ⇒ Boolean?
readonly
Whether the resolution is being executed during the prepare phase or not.
-
#remove_empty ⇒ Boolean?
readonly
Whether to remove undefined elements from arrays and objects when resolving.
-
#resolver ⇒ AWSCDK::ITokenResolver
readonly
The resolver to apply to any resolvable tokens found.
-
#scope ⇒ Constructs::IConstruct
readonly
The scope from which resolution is performed.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(resolver:, scope:, preparing: nil, remove_empty: nil) ⇒ ResolveOptions
constructor
A new instance of ResolveOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(resolver:, scope:, preparing: nil, remove_empty: nil) ⇒ ResolveOptions
Returns a new instance of ResolveOptions.
16 17 18 19 20 21 22 23 24 25 |
# File 'resolve_options.rb', line 16 def initialize(resolver:, scope:, preparing: nil, remove_empty: nil) @resolver = resolver Jsii::Type.check_type(@resolver, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JVG9rZW5SZXNvbHZlciJ9")), "resolver") @scope = scope Jsii::Type.check_type(@scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklDb25zdHJ1Y3QifQ==")), "scope") @preparing = preparing Jsii::Type.check_type(@preparing, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "preparing") unless @preparing.nil? @remove_empty = remove_empty Jsii::Type.check_type(@remove_empty, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "removeEmpty") unless @remove_empty.nil? end |
Instance Attribute Details
#preparing ⇒ Boolean? (readonly)
Default: false
Whether the resolution is being executed during the prepare phase or not.
39 40 41 |
# File 'resolve_options.rb', line 39 def preparing @preparing end |
#remove_empty ⇒ Boolean? (readonly)
Default: true
Whether to remove undefined elements from arrays and objects when resolving.
44 45 46 |
# File 'resolve_options.rb', line 44 def remove_empty @remove_empty end |
#resolver ⇒ AWSCDK::ITokenResolver (readonly)
The resolver to apply to any resolvable tokens found.
30 31 32 |
# File 'resolve_options.rb', line 30 def resolver @resolver end |
#scope ⇒ Constructs::IConstruct (readonly)
The scope from which resolution is performed.
34 35 36 |
# File 'resolve_options.rb', line 34 def scope @scope end |
Class Method Details
.jsii_properties ⇒ Object
46 47 48 49 50 51 52 53 |
# File 'resolve_options.rb', line 46 def self.jsii_properties { :resolver => "resolver", :scope => "scope", :preparing => "preparing", :remove_empty => "removeEmpty", } end |
Instance Method Details
#to_jsii ⇒ Object
55 56 57 58 59 60 61 62 63 64 |
# File 'resolve_options.rb', line 55 def to_jsii result = {} result.merge!({ "resolver" => @resolver, "scope" => @scope, "preparing" => @preparing, "removeEmpty" => @remove_empty, }) result.compact end |