Class: Schema::Brand::Scope
Defined Under Namespace
Classes: List, Which
Constant Summary
collapse
- DEFAULT_SCOPE_ID =
0
Instance Method Summary
collapse
decode_pointer, from_pointer, #initialize
Constructor Details
This class inherits a constructor from Capnp::Struct
Instance Method Details
#inherit ⇒ Object
904
|
# File 'lib/capnp/generator/schema.capnp.rb', line 904
def inherit = nil
|
#is_bind? ⇒ Boolean
902
|
# File 'lib/capnp/generator/schema.capnp.rb', line 902
def is_bind? = which? == Which::Bind
|
#is_inherit? ⇒ Boolean
906
|
# File 'lib/capnp/generator/schema.capnp.rb', line 906
def is_inherit? = which? == Which::Inherit
|
#scope_id ⇒ Object
898
|
# File 'lib/capnp/generator/schema.capnp.rb', line 898
def scope_id = read_u64(0, 0)
|
#to_obj ⇒ Object
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
914
|
# File 'lib/capnp/generator/schema.capnp.rb', line 914
def which? = Which.from_integer(read_u16(8, 0))
|