Class: AWSCDK::TreeInspector
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::TreeInspector
- Defined in:
- tree_inspector.rb
Overview
Inspector that maintains an attribute bag.
Class Method Summary collapse
Instance Method Summary collapse
-
#add_attribute(key, value) ⇒ void
Adds attribute to bag.
-
#attributes ⇒ Hash{String => Object}
Represents the bag of attributes as key-value pairs.
-
#initialize ⇒ TreeInspector
constructor
A new instance of TreeInspector.
Constructor Details
#initialize ⇒ TreeInspector
Returns a new instance of TreeInspector.
8 9 10 |
# File 'tree_inspector.rb', line 8 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 17 |
# File 'tree_inspector.rb', line 12 def self.jsii_overridable_methods { :attributes => { kind: :property, name: "attributes", is_optional: false }, :add_attribute => { kind: :method, name: "addAttribute", is_optional: false }, } end |
Instance Method Details
#add_attribute(key, value) ⇒ void
This method returns an undefined value.
Adds attribute to bag.
Keys should be added by convention to prevent conflicts i.e. L1 constructs will contain attributes with keys prefixed with aws:cdk:cloudformation
34 35 36 37 38 |
# File 'tree_inspector.rb', line 34 def add_attribute(key, value) Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "value") jsii_call_method("addAttribute", [key, value]) end |
#attributes ⇒ Hash{String => Object}
Represents the bag of attributes as key-value pairs.
22 23 24 |
# File 'tree_inspector.rb', line 22 def attributes() jsii_get_property("attributes") end |