Class: Kobako::Snippet::Binary
- Inherits:
-
Data
- Object
- Data
- Kobako::Snippet::Binary
- Defined in:
- lib/kobako/snippet/binary.rb,
sig/kobako/snippet/binary.rbs
Overview
Kobako::Snippet::Binary — value object representing a single
#preload(binary:) entry held by Kobako::Catalog::Snippets.
The body is RITE bytecode (as emitted by mrbc) carried as an
ASCII_8BIT String so msgpack-ruby encodes it as bin family on
the wire (docs/wire-codec.md Invocation channels).
The host treats the bytes as opaque — the snippet's canonical
name, when present, lives in the bytecode's embedded debug_info
and is resolved by the guest at load time; structural validation
is deferred to the first invocation's guest replay.
The class is a Data.define subclass — frozen and value-equal.
Callers (chiefly Catalog::Snippets) construct instances via keyword
form Binary.new(body: ...). Wire-form construction is the
registry's responsibility.
Constant Summary collapse
- KIND =
The
kindfield value carried by bytecode snippets in their Frame 3 wire envelope entry (docs/wire-codec.md Invocation channels). "bytecode"
Instance Attribute Summary collapse
-
#body ⇒ String
readonly
Returns the value of attribute body.
Class Method Summary collapse
Instance Attribute Details
#body ⇒ String (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'sig/kobako/snippet/binary.rbs', line 6 def body @body end |