Class: CustomElementsManifestParser::Nodes::Manifest
- Inherits:
-
BaseStruct
- Object
- Dry::Struct
- BaseStruct
- CustomElementsManifestParser::Nodes::Manifest
- Defined in:
- lib/custom_elements_manifest_parser/nodes/manifest.rb
Overview
top level of a custom elements manifest. This technically isn't a "ParseableNode". its a top level "root" of a custom-elements.json.
Instance Attribute Summary collapse
-
#deprecated ⇒ String, ...
- if nil or false, not deprecated.
-
#modules ⇒ Array<Nodes::JavaScriptModule>
- An array of the modules this package contains..
-
#readme ⇒ String?
- The Markdown to use for the main readme of this package.
-
#schemaVersion ⇒ String
- Version of the schema.
Instance Method Summary collapse
Instance Attribute Details
#deprecated ⇒ String, ...
Returns - if nil or false, not deprecated. If true, deprecated. If string, why it's deprecated.
22 |
# File 'lib/custom_elements_manifest_parser/nodes/manifest.rb', line 22 attribute :deprecated, Types::Bool.optional | Types::String.optional.(required: false) |
#modules ⇒ Array<Nodes::JavaScriptModule>
Returns - An array of the modules this package contains..
14 |
# File 'lib/custom_elements_manifest_parser/nodes/manifest.rb', line 14 attribute :modules, Types::Strict::Array |
#readme ⇒ String?
Returns - The Markdown to use for the main readme of this package.
18 |
# File 'lib/custom_elements_manifest_parser/nodes/manifest.rb', line 18 attribute :readme, Types::Strict::String.optional.(required: false) |
#schemaVersion ⇒ String
Returns - Version of the schema.
10 |
# File 'lib/custom_elements_manifest_parser/nodes/manifest.rb', line 10 attribute :schemaVersion, Types::Strict::String |
Instance Method Details
#visit(parser:) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/custom_elements_manifest_parser/nodes/manifest.rb', line 24 def visit(parser:) hash = {} hash[:modules] = modules.map do |mod| parser.visit_node(mod) end hash[:modules] new(hash) end |