Class: DAP::Enum
- Inherits:
-
Object
- Object
- DAP::Enum
- Defined in:
- lib/dap/enum.rb
Overview
Base class for DAP enumerations
Direct Known Subclasses
ChecksumAlgorithm, CompletionItemType, DataBreakpointAccessType, ExceptionBreakMode, SteppingGranularity
Class Method Summary collapse
-
.from(value) ⇒ Enum
Retreive an enumeration instance by value.
Instance Method Summary collapse
-
#to_s ⇒ Object
The enumeration string value.
-
#to_wire ⇒ Object
The enumeration string value, suitable for encoding.
Class Method Details
.from(value) ⇒ Enum
Retreive an enumeration instance by value.
6 7 8 |
# File 'lib/dap/enum.rb', line 6 def self.from(value) values[value] end |
Instance Method Details
#to_s ⇒ Object
The enumeration string value
11 12 13 |
# File 'lib/dap/enum.rb', line 11 def to_s @value end |
#to_wire ⇒ Object
The enumeration string value, suitable for encoding
16 17 18 |
# File 'lib/dap/enum.rb', line 16 def to_wire @value end |