Module: EvilEvents::Core::Events::EventExtensions::MetadataExtendable::ClassMethods Private
- Defined in:
- lib/evil_events/core/events/event_extensions/metadata_extendable.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #inherited(child_class) ⇒ Object private
-
#metadata(key, type = EvilEvents::Types::Any, **options) ⇒ Object
private
Void.
- #metadata_class ⇒ Class{AbstractMetadata} private
- #metadata_fields ⇒ Array<Symbol> private
Instance Method Details
#inherited(child_class) ⇒ 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.
30 31 32 33 |
# File 'lib/evil_events/core/events/event_extensions/metadata_extendable.rb', line 30 def inherited(child_class) child_class.const_set(:Metadata, Class.new(AbstractMetadata)) super end |
#metadata(key, type = EvilEvents::Types::Any, **options) ⇒ 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.
Returns void.
48 49 50 51 52 53 54 |
# File 'lib/evil_events/core/events/event_extensions/metadata_extendable.rb', line 48 def (key, type = EvilEvents::Types::Any, **) if type.is_a?(Symbol) type = EvilEvents::Core::Bootstrap[:event_system].resolve_type(type, **) end .attribute(key, type) end |
#metadata_class ⇒ Class{AbstractMetadata}
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.
38 39 40 |
# File 'lib/evil_events/core/events/event_extensions/metadata_extendable.rb', line 38 def const_get(:Metadata) end |
#metadata_fields ⇒ Array<Symbol>
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.
59 60 61 |
# File 'lib/evil_events/core/events/event_extensions/metadata_extendable.rb', line 59 def .attribute_names end |