Class: AWSCDK::InjectionContext

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
injection_context.rb

Overview

This defines the values needed for Injection.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, scope:) ⇒ InjectionContext

Returns a new instance of InjectionContext.

Parameters:

  • id (String)

    id from the Construct constructor.

  • scope (Constructs::Construct)

    scope from the constructor.



9
10
11
12
13
14
# File 'injection_context.rb', line 9

def initialize(id:, scope:)
  @id = id
  Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  @scope = scope
  Jsii::Type.check_type(@scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
end

Instance Attribute Details

#idString (readonly)

id from the Construct constructor.

Returns:

  • (String)


19
20
21
# File 'injection_context.rb', line 19

def id
  @id
end

#scopeConstructs::Construct (readonly)

scope from the constructor.

Returns:

  • (Constructs::Construct)


23
24
25
# File 'injection_context.rb', line 23

def scope
  @scope
end

Class Method Details

.jsii_propertiesObject



25
26
27
28
29
30
# File 'injection_context.rb', line 25

def self.jsii_properties
  {
    :id => "id",
    :scope => "scope",
  }
end

Instance Method Details

#to_jsiiObject



32
33
34
35
36
37
38
39
# File 'injection_context.rb', line 32

def to_jsii
  result = {}
  result.merge!({
    "id" => @id,
    "scope" => @scope,
  })
  result.compact
end