Class: Schema::Brand::Scope

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

Defined Under Namespace

Classes: List, Which

Constant Summary collapse

DEFAULT_SCOPE_ID =
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

#bindObject



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

def bind = Schema::Brand::Binding::List.from_pointer(read_pointer(0))

#inheritObject



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

def inherit = nil

#is_bind?Boolean

Returns:

  • (Boolean)


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

def is_bind? = which? == Which::Bind

#is_inherit?Boolean

Returns:

  • (Boolean)


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

def is_inherit? = which? == Which::Inherit

#scope_idObject



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

def scope_id = read_u64(0, 0)

#to_objObject



932
933
934
935
936
937
938
939
940
# File 'lib/capnp/generator/schema.capnp.rb', line 932

def to_obj
  res = {}
  res["scope_id"] = scope_id
  case which?
  when Which::Bind then res["bind"] = bind&.to_obj
  when Which::Inherit then res["inherit"] = inherit
  end
  res
end

#which?Boolean

Returns:

  • (Boolean)


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

def which? = Which.from_integer(read_u16(8, 0))