Class: BiDiGenerate::FieldIR Private
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Struct
|
|
|
Instance Chain:
self,
Struct
|
|
| Inherits: |
Struct
|
| Defined in: | rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb |
Overview
ref is the Protocol-relative class path for a nested structured field (nil
for a scalar/opaque field); list wraps it in an array. wire_key is the exact
JSON payload key (the schema's wire name, baked verbatim).
Instance Attribute Summary
-
#const
rw
Internal use only
ref is the Protocol-relative class path for a nested structured field (nil for a scalar/opaque field); list wraps it in an array.
-
#enum
rw
Internal use only
ref is the Protocol-relative class path for a nested structured field (nil for a scalar/opaque field); list wraps it in an array.
-
#list
rw
Internal use only
ref is the Protocol-relative class path for a nested structured field (nil for a scalar/opaque field); list wraps it in an array.
-
#nullable
rw
Internal use only
ref is the Protocol-relative class path for a nested structured field (nil for a scalar/opaque field); list wraps it in an array.
-
#primitive
rw
Internal use only
ref is the Protocol-relative class path for a nested structured field (nil for a scalar/opaque field); list wraps it in an array.
-
#rbs
rw
Internal use only
ref is the Protocol-relative class path for a nested structured field (nil for a scalar/opaque field); list wraps it in an array.
-
#ref
rw
Internal use only
ref is the Protocol-relative class path for a nested structured field (nil for a scalar/opaque field); list wraps it in an array.
-
#required
rw
Internal use only
ref is the Protocol-relative class path for a nested structured field (nil for a scalar/opaque field); list wraps it in an array.
-
#ruby_name
rw
Internal use only
ref is the Protocol-relative class path for a nested structured field (nil for a scalar/opaque field); list wraps it in an array.
-
#scalar
rw
Internal use only
ref is the Protocol-relative class path for a nested structured field (nil for a scalar/opaque field); list wraps it in an array.
-
#wire_key
rw
Internal use only
ref is the Protocol-relative class path for a nested structured field (nil for a scalar/opaque field); list wraps it in an array.
Instance Method Summary
-
#rbs_arg
Internal use only
The
self.newkeyword for this field — a user-supplied input carrying the field's value type. -
#rbs_reader
Internal use only
The
attr_readertype. -
#scalar_literal
Internal use only
The #scalar primitive(s) a bare non-object wire value must match at a scalar-tolerant union position: a single primitive string, or an array when the union's scalar arms differ.
-
#spec_entry(indent = 0)
Internal use only
A
Serialization::Record.definespec entry:name: 'jsonKey'shorthand, orname: {wire_key:, …}when the field carries JSON facts beyond its name. -
#value_facts
Internal use only
The JSON facts beyond the field's name, in the order
Record.definereads them.
Instance Attribute Details
#const (rw)
ref is the Protocol-relative class path for a nested structured field (nil
for a scalar/opaque field); list wraps it in an array. wire_key is the exact
JSON payload key (the schema's wire name, baked verbatim).
#enum (rw)
ref is the Protocol-relative class path for a nested structured field (nil
for a scalar/opaque field); list wraps it in an array. wire_key is the exact
JSON payload key (the schema's wire name, baked verbatim).
#list (rw)
ref is the Protocol-relative class path for a nested structured field (nil
for a scalar/opaque field); list wraps it in an array. wire_key is the exact
JSON payload key (the schema's wire name, baked verbatim).
#nullable (rw)
ref is the Protocol-relative class path for a nested structured field (nil
for a scalar/opaque field); list wraps it in an array. wire_key is the exact
JSON payload key (the schema's wire name, baked verbatim).
#primitive (rw)
ref is the Protocol-relative class path for a nested structured field (nil
for a scalar/opaque field); list wraps it in an array. wire_key is the exact
JSON payload key (the schema's wire name, baked verbatim).
#rbs (rw)
ref is the Protocol-relative class path for a nested structured field (nil
for a scalar/opaque field); list wraps it in an array. wire_key is the exact
JSON payload key (the schema's wire name, baked verbatim).
#ref (rw)
ref is the Protocol-relative class path for a nested structured field (nil
for a scalar/opaque field); list wraps it in an array. wire_key is the exact
JSON payload key (the schema's wire name, baked verbatim).
#required (rw)
ref is the Protocol-relative class path for a nested structured field (nil
for a scalar/opaque field); list wraps it in an array. wire_key is the exact
JSON payload key (the schema's wire name, baked verbatim).
#ruby_name (rw)
ref is the Protocol-relative class path for a nested structured field (nil
for a scalar/opaque field); list wraps it in an array. wire_key is the exact
JSON payload key (the schema's wire name, baked verbatim).
#scalar (rw)
ref is the Protocol-relative class path for a nested structured field (nil
for a scalar/opaque field); list wraps it in an array. wire_key is the exact
JSON payload key (the schema's wire name, baked verbatim).
#wire_key (rw)
ref is the Protocol-relative class path for a nested structured field (nil
for a scalar/opaque field); list wraps it in an array. wire_key is the exact
JSON payload key (the schema's wire name, baked verbatim).
Instance Method Details
#rbs_arg
The self.new keyword for this field — a user-supplied input carrying the field's
value type. The ? prefix marks the field omittable; its value type already carries
the schema's nullability, so nil is admitted only for a nullable field.
#rbs_reader
The attr_reader type. A present value is #rbs; an omitted optional reads back
the UNSET sentinel, which a value type can't capture, so optionals stay untyped.
#scalar_literal
The #scalar primitive(s) a bare non-object wire value must match at a scalar-tolerant union position: a single primitive string, or an array when the union's scalar arms differ.
#spec_entry(indent = 0)
A Serialization::Record.define spec entry: name: 'jsonKey' shorthand, or
name: {wire_key:, …} when the field carries JSON facts beyond its name.
enum carries the allowed-values constant path, validated at construction.
# File 'rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 329
def spec_entry(indent = 0) = value_facts return "#{ruby_name}: '#{wire_key}'" if .empty? .unshift("wire_key: '#{wire_key}'") BiDiGenerate.wrap_call("#{ruby_name}: ", , indent, open: '{', close: '}') end
#value_facts
The JSON facts beyond the field's name, in the order Record.define reads them. A
nullable const (literal / null) carries const: so the runtime rejects a value that
is neither the literal nor null; const.nil? means the field has no const at all.
# File 'rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 340
def value_facts facts = [] facts << 'required: false' unless required facts << 'nullable: true' if nullable facts << "const: #{BiDiGenerate.ruby_literal(const)}" unless const.nil? facts << "ref: '#{ref}'" if ref facts << 'list: true' if list facts << "scalar: #{scalar_literal}" if scalar facts << "enum: '#{enum}'" if enum facts << "primitive: '#{primitive}'" if primitive facts end