Class: BiDiGenerate::VendorModule Private
- Inherits:
-
Struct
- Object
- Struct
- BiDiGenerate::VendorModule
- 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 namespaced group of browser-specific commands (e.g. Firefox's), emitted as a subclass of
the domain: it overrides the commands a vendor extends with moz: fields and adds the
commands a vendor defines in the domain (webExtension.moz:listExtensions).
A subclass (rather than a runtime-mixed module) keeps the vendor signatures statically
visible to type checkers, and is constructed directly (<Name>.new(source)) for a
matching session — no factory or runtime mix-in.
Instance Attribute Summary collapse
-
#commands ⇒ Object
Returns the value of attribute commands.
-
#name ⇒ Object
Returns the value of attribute name.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#parent ⇒ Object
Returns the value of attribute parent.
Instance Method Summary collapse
- #render(indent) ⇒ Object private
Instance Attribute Details
#commands ⇒ Object
Returns the value of attribute commands
312 313 314 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 312 def commands @commands end |
#name ⇒ Object
Returns the value of attribute name
312 313 314 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 312 def name @name end |
#namespace ⇒ Object
Returns the value of attribute namespace
312 313 314 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 312 def namespace @namespace end |
#parent ⇒ Object
Returns the value of attribute parent
312 313 314 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 312 def parent @parent end |
Instance Method Details
#render(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.
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 |
# File 'lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 313 def render(indent) pad = ' ' * indent lines = [ "#{pad}# @api private", "#{pad}# #{namespace}: vendor variant of #{parent}, with browser-specific commands and params.", "#{pad}# Construct #{name}.new(source) for a matching session; other sessions use #{parent}.", "#{pad}class #{name} < #{parent}" ] commands.each_with_index do |cmd, index| lines << '' unless index.zero? lines.concat(cmd.render_lines(indent + 2)) end lines << "#{pad}end" lines.join("\n") end |