Class: BiDiGenerate::UnionClass Private
- Inherits:
-
Struct
- Object
- Struct
- BiDiGenerate::UnionClass
- 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.
A generated discriminated union (< Serialization::Union, resolved by lexical scope). nested holds its synthetic variant records (see nest_synthetic).
Instance Attribute Summary collapse
-
#discriminator_wire ⇒ Object
Returns the value of attribute discriminator_wire.
-
#nested ⇒ Object
Returns the value of attribute nested.
-
#ruby_name ⇒ Object
Returns the value of attribute ruby_name.
-
#schema_name ⇒ Object
Returns the value of attribute schema_name.
-
#variants ⇒ Object
Returns the value of attribute variants.
Instance Method Summary collapse
-
#discriminator_decl(indent) ⇒ Object
private
discriminator 'wire', ordiscriminator 'wire', {sym: 'token', …}(wrapped when long) carrying the inbound wire->symbol map for string-tagged variants. - #fallback_variant ⇒ Object private
- #nested_types ⇒ Object private
- #presence_variants ⇒ Object private
- #union? ⇒ Boolean private
- #value_variants ⇒ Object private
Instance Attribute Details
#discriminator_wire ⇒ Object
Returns the value of attribute discriminator_wire
351 352 353 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 351 def discriminator_wire @discriminator_wire end |
#nested ⇒ Object
Returns the value of attribute nested
351 352 353 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 351 def nested @nested end |
#ruby_name ⇒ Object
Returns the value of attribute ruby_name
351 352 353 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 351 def ruby_name @ruby_name end |
#schema_name ⇒ Object
Returns the value of attribute schema_name
351 352 353 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 351 def schema_name @schema_name end |
#variants ⇒ Object
Returns the value of attribute variants
351 352 353 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 351 def variants @variants end |
Instance Method Details
#discriminator_decl(indent) ⇒ 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.
discriminator 'wire', or discriminator 'wire', {sym: 'token', …} (wrapped when
long) carrying the inbound wire->symbol map for string-tagged variants.
360 361 362 363 364 365 366 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 360 def discriminator_decl(indent) pairs = value_variants.filter_map(&:discriminator_pair) head = "discriminator '#{discriminator_wire}'" return head if pairs.empty? BiDiGenerate.wrap_call("#{head}, ", pairs, indent, open: '{', close: '}') end |
#fallback_variant ⇒ 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.
355 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 355 def fallback_variant = variants.find { |v| v.mode == :fallback } |
#nested_types ⇒ 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.
356 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 356 def nested_types = nested || [] |
#presence_variants ⇒ 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.
354 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 354 def presence_variants = variants.select { |v| v.mode == :presence } |
#union? ⇒ 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.
352 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 352 def union? = true |
#value_variants ⇒ 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.
353 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 353 def value_variants = variants.select { |v| v.mode == :value } |