Class: DSP::ExceptionPathSegment
- Defined in:
- lib/dsp/dsp_protocol.rb
Overview
interface ExceptionPathSegment {
/** If false or missing this segment matches the names provided, otherwise it matches anything except the names provided. */
negate?: boolean;
/** Depending on the value of 'negate' the names that should match or not match. */
names: string[];
}
Instance Attribute Summary collapse
-
#names ⇒ Object
type: boolean # type: string[].
-
#negate ⇒ Object
type: boolean # type: string[].
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ ExceptionPathSegment
constructor
A new instance of ExceptionPathSegment.
Methods inherited from DSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ ExceptionPathSegment
Returns a new instance of ExceptionPathSegment.
4521 4522 4523 4524 |
# File 'lib/dsp/dsp_protocol.rb', line 4521 def initialize(initial_hash = nil) super @optional_method_names = %i[negate] end |
Instance Attribute Details
#names ⇒ Object
type: boolean # type: string[]
4519 4520 4521 |
# File 'lib/dsp/dsp_protocol.rb', line 4519 def names @names end |
#negate ⇒ Object
type: boolean # type: string[]
4519 4520 4521 |
# File 'lib/dsp/dsp_protocol.rb', line 4519 def negate @negate end |
Instance Method Details
#from_h!(value) ⇒ Object
4526 4527 4528 4529 4530 4531 |
# File 'lib/dsp/dsp_protocol.rb', line 4526 def from_h!(value) value = {} if value.nil? self.negate = value['negate'] # Unknown type self.names = value['names'].map { |val| val } unless value['names'].nil? self end |