Class: BiDiGenerate::VendorModule Private
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Struct
|
|
|
Instance Chain:
self,
Struct
|
|
| Inherits: |
Struct
|
| Defined in: | rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb |
Overview
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. types are the variant's own params
records, which shadow the shared ones so its overriding commands build them by bare name.
Instance Attribute Summary
-
#commands
rw
Internal use only
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). -
#name
rw
Internal use only
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). -
#namespace
rw
Internal use only
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). -
#parent
rw
Internal use only
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). -
#types
rw
Internal use only
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).
Instance Method Summary
- #render(indent) Internal use only
- #type_lines(type, indent) Internal use only
Instance Attribute Details
#commands (rw)
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. types are the variant's own params
records, which shadow the shared ones so its overriding commands build them by bare name.
#name (rw)
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. types are the variant's own params
records, which shadow the shared ones so its overriding commands build them by bare name.
#namespace (rw)
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. types are the variant's own params
records, which shadow the shared ones so its overriding commands build them by bare name.
#parent (rw)
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. types are the variant's own params
records, which shadow the shared ones so its overriding commands build them by bare name.
#types (rw)
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. types are the variant's own params
records, which shadow the shared ones so its overriding commands build them by bare name.
Instance Method Details
#render(indent)
[ GitHub ]# File 'rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 272
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}" ] types.each { |type| lines.concat(type_lines(type, indent + 2)) << '' } 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
#type_lines(type, indent)
[ GitHub ]# File 'rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb', line 289
def type_lines(type, indent) pad = ' ' * indent lines = ["#{pad}# @api private", "#{pad}# @see #{BiDiGenerate::BIDI_DOC_URL}"] lines << "#{pad}# @see #{type.spec_href}" if type.spec_href lines << "#{pad}#{type.define_assignment(type.ruby_name, indent)}" end