Class: BiDiGenerate::Param Private
- Inherits:
-
Struct
- Object
- Struct
- BiDiGenerate::Param
- 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.
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 collapse
-
#enum ⇒ Object
Returns the value of attribute enum.
-
#rbs ⇒ Object
Returns the value of attribute rbs.
-
#required ⇒ Object
Returns the value of attribute required.
-
#ruby_name ⇒ Object
Returns the value of attribute ruby_name.
-
#wire_name ⇒ Object
Returns the value of attribute wire_name.
Instance Method Summary collapse
- #enum_check(indent) ⇒ Object private
-
#rbs_part ⇒ Object
private
An RBS keyword parameter carrying the param's value type.
-
#sig_part ⇒ Object
private
Optionals default to UNSET (omitted), so an explicit nil can still reach a nullable field as wire null.
Instance Attribute Details
#enum ⇒ Object
Returns the value of attribute enum
149 150 151 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 149 def enum @enum end |
#rbs ⇒ Object
Returns the value of attribute rbs
149 150 151 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 149 def rbs @rbs end |
#required ⇒ Object
Returns the value of attribute required
149 150 151 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 149 def required @required end |
#ruby_name ⇒ Object
Returns the value of attribute ruby_name
149 150 151 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 149 def ruby_name @ruby_name end |
#wire_name ⇒ Object
Returns the value of attribute wire_name
149 150 151 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 149 def wire_name @wire_name end |
Instance Method Details
#enum_check(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.
156 157 158 159 160 |
# File '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 ⇒ 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.
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).
165 166 167 168 |
# File '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 ⇒ 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.
Optionals default to UNSET (omitted), so an explicit nil can still reach a nullable field as wire null.
152 153 154 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 152 def sig_part required ? "#{ruby_name}:" : "#{ruby_name}: Serialization::UNSET" end |