Class: DAP::Event

Inherits:
ProtocolMessage show all
Defined in:
lib/dap/event.rb

Overview

Base class of requests, responses, and events.

Class Method Summary collapse

Methods inherited from ProtocolMessage

from, #initialize, types

Methods inherited from Base

#[], build, empty, #initialize, many, one_of, properties, property, property_names, #to_wire, transform, #validate!

Constructor Details

This class inherits a constructor from DAP::ProtocolMessage

Class Method Details

.bodiesHash<Symbol, Class>

Allowed event kinds and their body types.

Returns:

  • (Hash<Symbol, Class>)


26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/dap/event.rb', line 26

def self.bodies
  @bodies ||= one_of(
    initialized: empty,
    stopped: DAP::StoppedEventBody,
    continued: DAP::ContinuedEventBody,
    exited: DAP::ExitedEventBody,
    terminated: DAP::TerminatedEventBody,
    thread: DAP::ThreadEventBody,
    output: DAP::OutputEventBody,
    breakpoint: DAP::BreakpointEventBody,
    module: DAP::ModuleEventBody,
    loadedSource: DAP::LoadedSourceEventBody,
    process: DAP::ProcessEventBody,
    capabilities: DAP::CapabilitiesEventBody,
    progressStart: DAP::ProgressStartEventBody,
    progressUpdate: DAP::ProgressUpdateEventBody,
    progressEnd: DAP::ProgressEndEventBody,
    invalidated: DAP::InvalidatedEventBody,
  )
end

.typeObject



20
21
22
# File 'lib/dap/event.rb', line 20

def self.type
  'event'
end