Class: AWSCDK::Assertions::MatchCapture

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
assertions/match_capture.rb

Overview

Information about a value captured during match.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(capture:, value:) ⇒ MatchCapture

Returns a new instance of MatchCapture.

Parameters:

  • capture (AWSCDK::Assertions::Capture)

    The instance of Capture class to which this capture is associated with.

  • value (Object)

    The value that was captured.



9
10
11
12
13
14
# File 'assertions/match_capture.rb', line 9

def initialize(capture:, value:)
  @capture = capture
  Jsii::Type.check_type(@capture, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hc3NlcnRpb25zLkNhcHR1cmUifQ==")), "capture")
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "value")
end

Instance Attribute Details

#captureAWSCDK::Assertions::Capture (readonly)

The instance of Capture class to which this capture is associated with.



19
20
21
# File 'assertions/match_capture.rb', line 19

def capture
  @capture
end

#valueObject (readonly)

The value that was captured.

Returns:

  • (Object)


23
24
25
# File 'assertions/match_capture.rb', line 23

def value
  @value
end

Class Method Details

.jsii_propertiesObject



25
26
27
28
29
30
# File 'assertions/match_capture.rb', line 25

def self.jsii_properties
  {
    :capture => "capture",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



32
33
34
35
36
37
38
39
# File 'assertions/match_capture.rb', line 32

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