Class: Schema::Field::GroupOrdinal
Defined Under Namespace
Classes: Which
Constant Summary
collapse
- DEFAULT_EXPLICIT =
0
Instance Method Summary
collapse
decode_pointer, from_pointer, #initialize
Constructor Details
This class inherits a constructor from Capnp::Struct
Instance Method Details
#explicit ⇒ Object
387
|
# File 'lib/capnp/generator/schema.capnp.rb', line 387
def explicit = read_u16(12, 0)
|
#implicit ⇒ Object
382
|
# File 'lib/capnp/generator/schema.capnp.rb', line 382
def implicit = nil
|
#is_explicit? ⇒ Boolean
389
|
# File 'lib/capnp/generator/schema.capnp.rb', line 389
def is_explicit? = which? == Which::Explicit
|
#is_implicit? ⇒ Boolean
384
|
# File 'lib/capnp/generator/schema.capnp.rb', line 384
def is_implicit? = which? == Which::Implicit
|
#to_obj ⇒ Object
409
410
411
412
413
414
415
416
|
# File 'lib/capnp/generator/schema.capnp.rb', line 409
def to_obj
res = {}
case which?
when Which::Implicit then res["implicit"] = implicit
when Which::Explicit then res["explicit"] = explicit
end
res
end
|
#which? ⇒ Boolean
391
|
# File 'lib/capnp/generator/schema.capnp.rb', line 391
def which? = Which.from_integer(read_u16(10, 0))
|