Class: Schema::Node::SourceInfo

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

Defined Under Namespace

Classes: List, Member

Constant Summary collapse

DEFAULT_ID =
0
DEFAULT_DOC_COMMENT =
nil

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

#doc_commentObject



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

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

#idObject



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

def id = read_u64(0, 0)

#membersObject



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

def members = Schema::Node::SourceInfo::Member::List.from_pointer(read_pointer(1))

#to_objObject



260
261
262
263
264
265
266
# File 'lib/capnp/generator/schema.capnp.rb', line 260

def to_obj
  res = {}
  res["id"] = id
  res["doc_comment"] = doc_comment&.to_obj
  res["members"] = members&.to_obj
  res
end