Class: Schema::Type::GroupAnyPointer::GroupUnconstrained
Defined Under Namespace
Classes: Which
Instance Method Summary
collapse
decode_pointer, from_pointer, #initialize
Constructor Details
This class inherits a constructor from Capnp::Struct
Instance Method Details
#any_kind ⇒ Object
685
|
# File 'lib/capnp/generator/schema.capnp.rb', line 685
def any_kind = nil
|
#capability ⇒ Object
697
|
# File 'lib/capnp/generator/schema.capnp.rb', line 697
def capability = nil
|
#is_any_kind? ⇒ Boolean
687
|
# File 'lib/capnp/generator/schema.capnp.rb', line 687
def is_any_kind? = which? == Which::AnyKind
|
#is_capability? ⇒ Boolean
699
|
# File 'lib/capnp/generator/schema.capnp.rb', line 699
def is_capability? = which? == Which::Capability
|
#is_list? ⇒ Boolean
695
|
# File 'lib/capnp/generator/schema.capnp.rb', line 695
def is_list? = which? == Which::List
|
#is_struct? ⇒ Boolean
691
|
# File 'lib/capnp/generator/schema.capnp.rb', line 691
def is_struct? = which? == Which::Struct
|
#list ⇒ Object
693
|
# File 'lib/capnp/generator/schema.capnp.rb', line 693
def list = nil
|
#struct ⇒ Object
689
|
# File 'lib/capnp/generator/schema.capnp.rb', line 689
def struct = nil
|
#to_obj ⇒ Object
723
724
725
726
727
728
729
730
731
732
|
# File 'lib/capnp/generator/schema.capnp.rb', line 723
def to_obj
res = {}
case which?
when Which::AnyKind then res["any_kind"] = any_kind
when Which::Struct then res["struct"] = struct
when Which::List then res["list"] = list
when Which::Capability then res["capability"] = capability
end
res
end
|
#which? ⇒ Boolean
701
|
# File 'lib/capnp/generator/schema.capnp.rb', line 701
def which? = Which.from_integer(read_u16(10, 0))
|