Class: AWSCDK::Assertions::MatchCapture
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Assertions::MatchCapture
- Defined in:
- assertions/match_capture.rb
Overview
Information about a value captured during match.
Instance Attribute Summary collapse
-
#capture ⇒ AWSCDK::Assertions::Capture
readonly
The instance of Capture class to which this capture is associated with.
-
#value ⇒ Object
readonly
The value that was captured.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(capture:, value:) ⇒ MatchCapture
constructor
A new instance of MatchCapture.
- #to_jsii ⇒ Object
Constructor Details
#initialize(capture:, value:) ⇒ MatchCapture
Returns a new instance of MatchCapture.
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
#capture ⇒ AWSCDK::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 |
#value ⇒ Object (readonly)
The value that was captured.
23 24 25 |
# File 'assertions/match_capture.rb', line 23 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |