Class: EvilEvents::Core::Events::EventExtensions::ClassSignature::Signature Private

Inherits:
Object
  • Object
show all
Defined in:
lib/evil_events/core/events/event_extensions/class_signature/signature.rb

Overview

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

Since:

  • 0.2.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event_class) ⇒ Signature

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 a new instance of Signature.

Parameters:

Since:

  • 0.2.0



15
16
17
# File 'lib/evil_events/core/events/event_extensions/class_signature/signature.rb', line 15

def initialize(event_class)
  @event_class = event_class
end

Instance Attribute Details

#event_classClass{EvilEvents::Core::Events::AbstractEvent} (readonly)

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



10
11
12
# File 'lib/evil_events/core/events/event_extensions/class_signature/signature.rb', line 10

def event_class
  @event_class
end

Instance Method Details

#==(other) ⇒ Boolean Also known as: eql?

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:

Returns:

  • (Boolean)

Since:

  • 0.2.0



65
66
67
# File 'lib/evil_events/core/events/event_extensions/class_signature/signature.rb', line 65

def ==(other)
  Equalizer.new(self, other).similar_signatures?
end

#adapter_stampHash

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:

  • (Hash)

Since:

  • 0.2.0



57
58
59
# File 'lib/evil_events/core/events/event_extensions/class_signature/signature.rb', line 57

def adapter_stamp
  { event_class.adapter_name => event_class.adapter }
end

#class_stampHash

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:

  • (Hash)

Since:

  • 0.2.0



36
37
38
# File 'lib/evil_events/core/events/event_extensions/class_signature/signature.rb', line 36

def class_stamp
  { name: event_class.name, creation_strategy: event_class.__creation_strategy__ }
end

#delegator_stampSymbol, String

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:

  • (Symbol, String)

Since:

  • 0.2.0



50
51
52
# File 'lib/evil_events/core/events/event_extensions/class_signature/signature.rb', line 50

def delegator_stamp
  event_class.default_delegator
end

#metadata_stampHash

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:

  • (Hash)

Since:

  • 0.2.0



29
30
31
# File 'lib/evil_events/core/events/event_extensions/class_signature/signature.rb', line 29

def 
  event_class::Metadata.schema
end

#payload_stampHash

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:

  • (Hash)

Since:

  • 0.2.0



22
23
24
# File 'lib/evil_events/core/events/event_extensions/class_signature/signature.rb', line 22

def payload_stamp
  event_class::Payload.schema
end

#type_alias_stampString

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:

  • (String)

Since:

  • 0.2.0



43
44
45
# File 'lib/evil_events/core/events/event_extensions/class_signature/signature.rb', line 43

def type_alias_stamp
  event_class.type
end