Module: EvilEvents::Core::Events::EventExtensions::Payloadable Private

Included in:
AbstractEvent
Defined in:
lib/evil_events/core/events/event_extensions/payloadable.rb,
lib/evil_events/core/events/event_extensions/payloadable/abstract_payload.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

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

AbstractPayload =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

Class.new(EvilEvents::Shared::Structure)

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base_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:

  • base_class (Class)

Since:

  • 0.1.0



11
12
13
# File 'lib/evil_events/core/events/event_extensions/payloadable.rb', line 11

def included(base_class)
  base_class.extend(ClassMethods)
end

Instance Method Details

#build_payload(**payload_attributes) ⇒ Class{AbstractPayload} (private)

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.1.0



21
22
23
# File 'lib/evil_events/core/events/event_extensions/payloadable.rb', line 21

def build_payload(**payload_attributes)
  self.class.payload_class.new(**payload_attributes)
end