Class: BiDiGenerate::VariantIR Private

Inherits:
Struct
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#mode ⇒ Object

Returns the value of attribute mode

Returns:

  • (Object) —

    the current value of mode



468
469
470
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 468

def mode
  @mode
end

#ref ⇒ Object

Returns the value of attribute ref

Returns:

  • (Object) —

    the current value of ref



468
469
470
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 468

def ref
  @ref
end

#requires ⇒ Object

Returns the value of attribute requires

Returns:

  • (Object) —

    the current value of requires



468
469
470
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 468

def requires
  @requires
end

#value ⇒ Object

Returns the value of attribute value

Returns:

  • (Object) —

    the current value of value



468
469
470
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 468

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).



479
480
481
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 479

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.

Returns:

  • (Boolean)


470
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 470

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'.



473
474
475
476
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 473

def variant_entry
  key = symbolic? ? "#{BiDiGenerate.enum_key(value)}:" : "#{BiDiGenerate.ruby_literal(value)} =>"
  "#{key} '#{ref}'"
end