Class: DSP::TerminatedEvent

Inherits:
DSPBase
  • Object
show all
Defined in:
lib/dsp/dsp_protocol.rb

Overview

interface TerminatedEvent extends Event {

    body?: {
        /** A debug adapter may set 'restart' to true (or to an arbitrary object) to request that the front end restarts the session.
            The value is not interpreted by the client and passed unmodified as an attribute '__restart' to the 'launch' and 'attach' requests.
        */
        restart?: any;
    };
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ TerminatedEvent

Returns a new instance of TerminatedEvent.



364
365
366
367
# File 'lib/dsp/dsp_protocol.rb', line 364

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[body]
end

Instance Attribute Details

#bodyObject

type: {



356
357
358
# File 'lib/dsp/dsp_protocol.rb', line 356

def body
  @body
end

#eventObject

/** A debug adapter may set ‘restart’ to true (or to an arbitrary object) to request that the front end restarts the session.

        The value is not interpreted by the client and passed unmodified as an attribute '__restart' to the 'launch' and 'attach' requests.
    */
    restart?: any;
}


362
363
364
# File 'lib/dsp/dsp_protocol.rb', line 362

def event
  @event
end

#seqObject

type: {



356
357
358
# File 'lib/dsp/dsp_protocol.rb', line 356

def seq
  @seq
end

#typeObject

type: {



356
357
358
# File 'lib/dsp/dsp_protocol.rb', line 356

def type
  @type
end

Instance Method Details

#from_h!(value) ⇒ Object



369
370
371
372
373
374
375
376
# File 'lib/dsp/dsp_protocol.rb', line 369

def from_h!(value)
  value = {} if value.nil?
  self.body = value['body'] # Unknown type
  self.event = value['event']
  self.seq = value['seq']
  self.type = value['type']
  self
end