Class: BiDiGenerate::Param Private
- Inherits:
-
Struct
- Object
- Struct
- BiDiGenerate::Param
- Defined in:
- rb/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
174 175 176 |
# File 'rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 174 def enum @enum end |
#rbs ⇒ Object
Returns the value of attribute rbs
174 175 176 |
# File 'rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 174 def rbs @rbs end |
#required ⇒ Object
Returns the value of attribute required
174 175 176 |
# File 'rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 174 def required @required end |
#ruby_name ⇒ Object
Returns the value of attribute ruby_name
174 175 176 |
# File 'rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 174 def ruby_name @ruby_name end |
#wire_name ⇒ Object
Returns the value of attribute wire_name
174 175 176 |
# File 'rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 174 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.
181 182 183 184 185 |
# File 'rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 181 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).
190 191 192 193 |
# File 'rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 190 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.
177 178 179 |
# File 'rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 177 def sig_part required ? "#{ruby_name}:" : "#{ruby_name}: Serialization::UNSET" end |