Class: Twilic::Core::Model::MessageKind

Inherits:
Object
  • Object
show all
Defined in:
lib/twilic/core/model.rb

Defined Under Namespace

Classes: Entry

Constant Summary collapse

SCALAR =
Entry.new(0x00)
ARRAY =
Entry.new(0x01)
MAP =
Entry.new(0x02)
SHAPED_OBJECT =
Entry.new(0x03)
SCHEMA_OBJECT =
Entry.new(0x04)
TYPED_VECTOR =
Entry.new(0x05)
ROW_BATCH =
Entry.new(0x06)
COLUMN_BATCH =
Entry.new(0x07)
CONTROL =
Entry.new(0x08)
EXT =
Entry.new(0x09)
STATE_PATCH =
Entry.new(0x0A)
TEMPLATE_BATCH =
Entry.new(0x0B)
CONTROL_STREAM =
Entry.new(0x0C)
BASE_SNAPSHOT =
Entry.new(0x0D)

Class Method Summary collapse

Class Method Details

.from_byte(b) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/twilic/core/model.rb', line 23

def self.from_byte(b)
  case b
  when 0x00 then SCALAR
  when 0x01 then ARRAY
  when 0x02 then MAP
  when 0x03 then SHAPED_OBJECT
  when 0x04 then SCHEMA_OBJECT
  when 0x05 then TYPED_VECTOR
  when 0x06 then ROW_BATCH
  when 0x07 then COLUMN_BATCH
  when 0x08 then CONTROL
  when 0x09 then EXT
  when 0x0A then STATE_PATCH
  when 0x0B then TEMPLATE_BATCH
  when 0x0C then CONTROL_STREAM
  when 0x0D then BASE_SNAPSHOT
  end
end