Class: BiDiGenerate::VariantIR Private
- Inherits:
-
Struct
- Object
- Struct
- BiDiGenerate::VariantIR
- Defined in:
- lib/selenium/webdriver/bidi/support/bidi_generate.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
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 collapse
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#ref ⇒ Object
Returns the value of attribute ref.
-
#requires ⇒ Object
Returns the value of attribute requires.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#discriminator_pair ⇒ Object
private
sym: 'wireToken'feeding the union's inbound wire->symbol map (string tags only). -
#symbolic? ⇒ Boolean
private
A string tag becomes an idiomatic symbol key; a bool/number tag stays a literal.
-
#variant_entry ⇒ Object
private
The variant table entry:
sym: 'Ref'for a string tag, elsetrue => 'Ref'.
Instance Attribute Details
#mode ⇒ Object
Returns the value of attribute mode
333 334 335 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 333 def mode @mode end |
#ref ⇒ Object
Returns the value of attribute ref
333 334 335 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 333 def ref @ref end |
#requires ⇒ Object
Returns the value of attribute requires
333 334 335 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 333 def requires @requires end |
#value ⇒ Object
Returns the value of attribute value
333 334 335 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 333 def value @value end |
Instance Method Details
#discriminator_pair ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
sym: 'wireToken' feeding the union's inbound wire->symbol map (string tags only).
344 345 346 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 344 def discriminator_pair "#{BiDiGenerate.enum_key(value)}: '#{value}'" if symbolic? end |
#symbolic? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
A string tag becomes an idiomatic symbol key; a bool/number tag stays a literal.
335 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 335 def symbolic? = value.is_a?(::String) |
#variant_entry ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The variant table entry: sym: 'Ref' for a string tag, else true => 'Ref'.
338 339 340 341 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 338 def variant_entry key = symbolic? ? "#{BiDiGenerate.enum_key(value)}:" : "#{BiDiGenerate.ruby_literal(value)} =>" "#{key} '#{ref}'" end |