Class: CustomElementsManifestParser::DataTypes::Reference
- Inherits:
-
BaseStruct
- Object
- Dry::Struct
- BaseStruct
- CustomElementsManifestParser::DataTypes::Reference
- Defined in:
- lib/custom_elements_manifest_parser/data_types/reference.rb
Overview
A reference to an export of a module.
All references are required to be publically accessible, so the canonical representation of a reference is the export it's available from.
package
should generally refer to an npm package name. If package
is
undefined then the reference is local to this package. If module
is
undefined the reference is local to the containing module.
References to global symbols like Array
, HTMLElement
, or Event
should
use a package
name of "global:"
.
Direct Known Subclasses
Instance Attribute Summary collapse
- #module ⇒ String?
-
#name ⇒ String
- Name of the reference.
-
#package ⇒ String?
- Name of the package.
Instance Method Summary collapse
Instance Attribute Details
#module ⇒ String?
29 |
# File 'lib/custom_elements_manifest_parser/data_types/reference.rb', line 29 attribute :module, Types::Strict::String.optional.(required: false) |
#name ⇒ String
Returns - Name of the reference.
21 |
# File 'lib/custom_elements_manifest_parser/data_types/reference.rb', line 21 attribute :name, Types::Strict::String |
#package ⇒ String?
Returns - Name of the package.
25 |
# File 'lib/custom_elements_manifest_parser/data_types/reference.rb', line 25 attribute :package, Types::Strict::String.optional.(required: false) |
Instance Method Details
#visit(parser:) ⇒ Object
31 32 33 |
# File 'lib/custom_elements_manifest_parser/data_types/reference.rb', line 31 def visit(parser:) self end |