Class: Schema::Method

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
DEFAULT_PARAM_STRUCT_TYPE =
0
DEFAULT_RESULT_STRUCT_TYPE =
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



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

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

#code_orderObject



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

def code_order = read_u16(0, 0)

#implicit_parametersObject



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

def implicit_parameters = Schema::Node::Parameter::List.from_pointer(read_pointer(4))

#nameObject



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

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

#param_brandObject



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

def param_brand = Schema::Brand.from_pointer(read_pointer(2))

#param_struct_typeObject



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

def param_struct_type = read_u64(8, 0)

#result_brandObject



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

def result_brand = Schema::Brand.from_pointer(read_pointer(3))

#result_struct_typeObject



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

def result_struct_type = read_u64(16, 0)

#to_objObject



533
534
535
536
537
538
539
540
541
542
543
544
# File 'lib/capnp/generator/schema.capnp.rb', line 533

def to_obj
  res = {}
  res["name"] = name&.to_obj
  res["code_order"] = code_order
  res["implicit_parameters"] = implicit_parameters&.to_obj
  res["param_struct_type"] = param_struct_type
  res["param_brand"] = param_brand&.to_obj
  res["result_struct_type"] = result_struct_type
  res["result_brand"] = result_brand&.to_obj
  res["annotations"] = annotations&.to_obj
  res
end