Class: BiDiGenerate::VariantIR 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
mode is :value (matched by discriminator), :fallback (the no-tag variant), or
:presence (selected when its required wire keys are all present).
Instance Attribute Summary
-
#mode
rw
Internal use only
mode is
:value(matched by discriminator),:fallback(the no-tag variant), or:presence(selected when its required wire keys are all present). -
#ref
rw
Internal use only
mode is
:value(matched by discriminator),:fallback(the no-tag variant), or:presence(selected when its required wire keys are all present). -
#requires
rw
Internal use only
mode is
:value(matched by discriminator),:fallback(the no-tag variant), or:presence(selected when its required wire keys are all present). -
#value
rw
Internal use only
mode is
:value(matched by discriminator),:fallback(the no-tag variant), or:presence(selected when its required wire keys are all present).
Instance Method Summary
-
#discriminator_pair
Internal use only
sym: 'wireToken'feeding the union's inbound wire->symbol map (string tags only). -
#symbolic? ⇒ Boolean
Internal use only
A string tag becomes an idiomatic symbol key; a bool/number tag stays a literal.
-
#variant_entry
Internal use only
The variant table entry:
sym: 'Ref'for a string tag, elsetrue => 'Ref'.
Instance Attribute Details
#mode (rw)
mode is :value (matched by discriminator), :fallback (the no-tag variant), or
:presence (selected when its required wire keys are all present).
#ref (rw)
mode is :value (matched by discriminator), :fallback (the no-tag variant), or
:presence (selected when its required wire keys are all present).
#requires (rw)
mode is :value (matched by discriminator), :fallback (the no-tag variant), or
:presence (selected when its required wire keys are all present).
#value (rw)
mode is :value (matched by discriminator), :fallback (the no-tag variant), or
:presence (selected when its required wire keys are all present).
Instance Method Details
#discriminator_pair
sym: 'wireToken' feeding the union's inbound wire->symbol map (string tags only).
# File 'rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 353
def discriminator_pair "#{BiDiGenerate.enum_key(value)}: '#{value}'" if symbolic? end
#symbolic? ⇒ Boolean
A string tag becomes an idiomatic symbol key; a bool/number tag stays a literal.
# File 'rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 344
def symbolic? = value.is_a?(::String)
#variant_entry
The variant table entry: sym: 'Ref' for a string tag, else true => 'Ref'.
# File 'rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 347
def variant_entry key = symbolic? ? "#{BiDiGenerate.enum_key(value)}:" : "#{BiDiGenerate.ruby_literal(value)} =>" "#{key} '#{ref}'" end