Class: EvilEvents::Core::Events::Notifier::Worker::Job Private

Inherits:
Object
  • Object
show all
Defined in:
lib/evil_events/core/events/notifier/worker/job.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.3.0

Since:

  • 0.3.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event, subscriber) ⇒ Job

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



23
24
25
26
# File 'lib/evil_events/core/events/notifier/worker/job.rb', line 23

def initialize(event, subscriber)
  @event = event
  @subscriber = subscriber
end

Instance Attribute Details

#eventEvilEvents::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.3.0



16
17
18
# File 'lib/evil_events/core/events/notifier/worker/job.rb', line 16

def event
  @event
end

#subscriberEvilEvents::Core::Events::Subscriber (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.3.0



10
11
12
# File 'lib/evil_events/core/events/notifier/worker/job.rb', line 10

def subscriber
  @subscriber
end

Instance Method Details

#performObject

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.

Returns:

  • void

Since:

  • 0.3.0



32
33
34
# File 'lib/evil_events/core/events/notifier/worker/job.rb', line 32

def perform
  subscriber.notify(event)
end