Class: CustomElementsManifestParser::DataTypes::Event
- Inherits:
-
BaseStruct
- Object
- Dry::Struct
- BaseStruct
- CustomElementsManifestParser::DataTypes::Event
- Defined in:
- lib/custom_elements_manifest_parser/data_types/event.rb
Overview
Documents events on a custom element
Instance Attribute Summary collapse
-
#deprecated ⇒ nil, ...
Whether the event is deprecated.
-
#description ⇒ nil, String
- A markdown description.
- #inheritedFrom ⇒ nil, Reference
-
#name ⇒ String
- Name of the event.
-
#type ⇒ Type
- The type of the event object that's fired.
Instance Method Summary collapse
Instance Attribute Details
#deprecated ⇒ nil, ...
Returns Whether the event is deprecated. If the value is a string, it's the reason for the deprecation.
31 |
# File 'lib/custom_elements_manifest_parser/data_types/event.rb', line 31 attribute :deprecated, Types::Strict::String.optional | Types::Strict::Bool.optional.(required: false) |
#description ⇒ nil, String
Returns - A markdown description.
21 |
# File 'lib/custom_elements_manifest_parser/data_types/event.rb', line 21 attribute :description, Types::Strict::String.optional.(required: false) |
#inheritedFrom ⇒ nil, Reference
25 |
# File 'lib/custom_elements_manifest_parser/data_types/event.rb', line 25 attribute :inheritedFrom, Types::Nominal::Any.optional.(required: false) |
#name ⇒ String
Returns - Name of the event.
10 |
# File 'lib/custom_elements_manifest_parser/data_types/event.rb', line 10 attribute :name, Types::Strict::String |
Instance Method Details
#visit(parser:) ⇒ Object
33 34 35 36 37 |
# File 'lib/custom_elements_manifest_parser/data_types/event.rb', line 33 def visit(parser:) hash = {} hash[:type] = parser.data_types[:type].new(type).visit(parser: parser) if type new(hash) end |