Class: Schema::Brand::Binding
Defined Under Namespace
Classes: List, Which
Instance Method Summary
collapse
decode_pointer, from_pointer, #initialize
Constructor Details
This class inherits a constructor from Capnp::Struct
Instance Method Details
#is_type? ⇒ Boolean
951
|
# File 'lib/capnp/generator/schema.capnp.rb', line 951
def is_type? = which? == Which::Type
|
#is_unbound? ⇒ Boolean
947
|
# File 'lib/capnp/generator/schema.capnp.rb', line 947
def is_unbound? = which? == Which::Unbound
|
#to_obj ⇒ Object
977
978
979
980
981
982
983
984
|
# File 'lib/capnp/generator/schema.capnp.rb', line 977
def to_obj
res = {}
case which?
when Which::Unbound then res["unbound"] = unbound
when Which::Type then res["type"] = type&.to_obj
end
res
end
|
#type ⇒ Object
949
|
# File 'lib/capnp/generator/schema.capnp.rb', line 949
def type = Schema::Type.from_pointer(read_pointer(0))
|
#unbound ⇒ Object
945
|
# File 'lib/capnp/generator/schema.capnp.rb', line 945
def unbound = nil
|
#which? ⇒ Boolean
959
|
# File 'lib/capnp/generator/schema.capnp.rb', line 959
def which? = Which.from_integer(read_u16(0, 0))
|