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.

Since:

  • 0.1.0

Instance Method Summary collapse

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.

Parameters:

  • child_class (Class)

Since:

  • 0.1.0



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())
  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.

Parameters:

  • key (Symbol)
  • type (EvilEvents::Shared::Types::Any) (defaults to: EvilEvents::Types::Any)
  • options (Hash)

Returns:

  • void

Since:

  • 0.1.0



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, **options)
  if type.is_a?(Symbol)
    type = EvilEvents::Core::Bootstrap[:event_system].resolve_type(type, **options)
  end

  .attribute(key, type)
end

#metadata_classClass{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.

Returns:

Since:

  • 0.2.0



38
39
40
# File 'lib/evil_events/core/events/event_extensions/metadata_extendable.rb', line 38

def 
  const_get(:Metadata)
end

#metadata_fieldsArray<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.

Returns:

  • (Array<Symbol>)

Since:

  • 0.1.0



59
60
61
# File 'lib/evil_events/core/events/event_extensions/metadata_extendable.rb', line 59

def 
  .attribute_names
end