Class: Schema::Enumerant

Inherits:
Capnp::Struct show all
Defined in:
lib/capnp/generator/schema.capnp.rb

Defined Under Namespace

Classes: List

Constant Summary collapse

DEFAULT_NAME =
nil
DEFAULT_CODE_ORDER =
0

Instance Method Summary collapse

Methods inherited from Capnp::Struct

decode_pointer, from_pointer, #initialize

Constructor Details

This class inherits a constructor from Capnp::Struct

Instance Method Details

#annotationsObject



467
# File 'lib/capnp/generator/schema.capnp.rb', line 467

def annotations = Schema::Annotation::List.from_pointer(read_pointer(1))

#code_orderObject



465
# File 'lib/capnp/generator/schema.capnp.rb', line 465

def code_order = read_u16(0, 0)

#nameObject



462
# File 'lib/capnp/generator/schema.capnp.rb', line 462

def name = Capnp::BufferString.from_pointer(read_pointer(0))

#to_objObject



475
476
477
478
479
480
481
# File 'lib/capnp/generator/schema.capnp.rb', line 475

def to_obj
  res = {}
  res["name"] = name&.to_obj
  res["code_order"] = code_order
  res["annotations"] = annotations&.to_obj
  res
end