123456789_123456789_123456789_123456789_123456789_

Class: BiDiGenerate::Param Private

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Struct
Instance Chain:
self, Struct
Inherits: Struct
  • Object
Defined in: rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb

Overview

ruby_name is the snake_case keyword argument; wire_name is the exact key the protocol expects (baked verbatim from the schema, no runtime conversion). enum is the allowed-values constant path for an enum-typed param (nil otherwise).

Instance Attribute Summary

  • #enum rw Internal use only

    ruby_name is the snake_case keyword argument; wire_name is the exact key the protocol expects (baked verbatim from the schema, no runtime conversion).

  • #rbs rw Internal use only

    ruby_name is the snake_case keyword argument; wire_name is the exact key the protocol expects (baked verbatim from the schema, no runtime conversion).

  • #required rw Internal use only

    ruby_name is the snake_case keyword argument; wire_name is the exact key the protocol expects (baked verbatim from the schema, no runtime conversion).

  • #ruby_name rw Internal use only

    ruby_name is the snake_case keyword argument; wire_name is the exact key the protocol expects (baked verbatim from the schema, no runtime conversion).

  • #wire_name rw Internal use only

    ruby_name is the snake_case keyword argument; wire_name is the exact key the protocol expects (baked verbatim from the schema, no runtime conversion).

Instance Method Summary

  • #enum_check(indent) Internal use only
  • #rbs_part Internal use only

    An RBS keyword parameter carrying the param's value type.

  • #sig_part Internal use only

    Optionals default to UNSET (omitted), so an explicit nil can still reach a nullable field as wire null.

Instance Attribute Details

#enum (rw)

ruby_name is the snake_case keyword argument; wire_name is the exact key the protocol expects (baked verbatim from the schema, no runtime conversion). enum is the allowed-values constant path for an enum-typed param (nil otherwise).

[ GitHub ]

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

Param = Struct.new(:ruby_name, :wire_name, :required, :enum, :rbs, keyword_init: true)

#rbs (rw)

ruby_name is the snake_case keyword argument; wire_name is the exact key the protocol expects (baked verbatim from the schema, no runtime conversion). enum is the allowed-values constant path for an enum-typed param (nil otherwise).

[ GitHub ]

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

Param = Struct.new(:ruby_name, :wire_name, :required, :enum, :rbs, keyword_init: true)

#required (rw)

ruby_name is the snake_case keyword argument; wire_name is the exact key the protocol expects (baked verbatim from the schema, no runtime conversion). enum is the allowed-values constant path for an enum-typed param (nil otherwise).

[ GitHub ]

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

Param = Struct.new(:ruby_name, :wire_name, :required, :enum, :rbs, keyword_init: true)

#ruby_name (rw)

ruby_name is the snake_case keyword argument; wire_name is the exact key the protocol expects (baked verbatim from the schema, no runtime conversion). enum is the allowed-values constant path for an enum-typed param (nil otherwise).

[ GitHub ]

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

Param = Struct.new(:ruby_name, :wire_name, :required, :enum, :rbs, keyword_init: true)

#wire_name (rw)

ruby_name is the snake_case keyword argument; wire_name is the exact key the protocol expects (baked verbatim from the schema, no runtime conversion). enum is the allowed-values constant path for an enum-typed param (nil otherwise).

[ GitHub ]

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

Param = Struct.new(:ruby_name, :wire_name, :required, :enum, :rbs, keyword_init: true)

Instance Method Details

#enum_check(indent)

[ GitHub ]

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

def enum_check(indent)
  return unless enum

  BiDiGenerate.wrap_call('Serialization.validate!', ["'#{wire_name}'", ruby_name, enum], indent)
end

#rbs_part

An RBS keyword parameter carrying the param's value type. The ? prefix marks the keyword omittable; the value type already carries the schema's nullability, so nil is admitted only for a nullable field (a non-nullable one rejects nil at construction).

[ GitHub ]

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

def rbs_part
  type = rbs || 'untyped'
  required ? "#{ruby_name}: #{type}" : "?#{ruby_name}: #{type}"
end

#sig_part

Optionals default to UNSET (omitted), so an explicit nil can still reach a nullable field as wire null.

[ GitHub ]

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

def sig_part
  required ? "#{ruby_name}:" : "#{ruby_name}: Serialization::UNSET"
end