Class: Constructs::MetadataOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- Constructs::MetadataOptions
- Defined in:
- metadata_options.rb
Overview
Options for construct.addMetadata().
Instance Attribute Summary collapse
-
#stack_trace ⇒ Boolean?
readonly
Include stack trace with metadata entry.
-
#stack_trace_override ⇒ Array<String>?
readonly
The actual stack trace to be added to the metadata.
-
#trace_from_function ⇒ Object?
readonly
A JavaScript function to begin tracing from.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(stack_trace: nil, stack_trace_override: nil, trace_from_function: nil) ⇒ MetadataOptions
constructor
A new instance of MetadataOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(stack_trace: nil, stack_trace_override: nil, trace_from_function: nil) ⇒ MetadataOptions
Returns a new instance of MetadataOptions.
10 11 12 13 14 15 16 17 |
# File 'metadata_options.rb', line 10 def initialize(stack_trace: nil, stack_trace_override: nil, trace_from_function: nil) @stack_trace = stack_trace Jsii::Type.check_type(@stack_trace, "eyJwcmltaXRpdmUiOiJib29sZWFuIn0=", "stackTrace") unless @stack_trace.nil? @stack_trace_override = stack_trace_override Jsii::Type.check_type(@stack_trace_override, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=", "stackTraceOverride") unless @stack_trace_override.nil? @trace_from_function = trace_from_function Jsii::Type.check_type(@trace_from_function, "eyJwcmltaXRpdmUiOiJhbnkifQ==", "traceFromFunction") unless @trace_from_function.nil? end |
Instance Attribute Details
#stack_trace ⇒ Boolean? (readonly)
Note:
Default: false
Include stack trace with metadata entry.
23 24 25 |
# File 'metadata_options.rb', line 23 def stack_trace @stack_trace end |
#stack_trace_override ⇒ Array<String>? (readonly)
The actual stack trace to be added to the metadata.
If this parameter is passed, the stackTrace parameter is ignored.
30 31 32 |
# File 'metadata_options.rb', line 30 def stack_trace_override @stack_trace_override end |
#trace_from_function ⇒ Object? (readonly)
Note:
Default: addMetadata()
A JavaScript function to begin tracing from.
This option is ignored unless stack_trace is true.
37 38 39 |
# File 'metadata_options.rb', line 37 def trace_from_function @trace_from_function end |
Class Method Details
.jsii_properties ⇒ Object
39 40 41 42 43 44 45 |
# File 'metadata_options.rb', line 39 def self.jsii_properties { :stack_trace => "stackTrace", :stack_trace_override => "stackTraceOverride", :trace_from_function => "traceFromFunction", } end |
Instance Method Details
#to_jsii ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'metadata_options.rb', line 47 def to_jsii result = {} result.merge!({ "stackTrace" => @stack_trace, "stackTraceOverride" => @stack_trace_override, "traceFromFunction" => @trace_from_function, }) result.compact end |