Class: MuchRailsPubSub::Publisher
- Inherits:
-
Object
- Object
- MuchRailsPubSub::Publisher
show all
- Includes:
- MuchRails::CallMethod
- Defined in:
- lib/much-rails-pub-sub/publisher.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(event_name, event_params:) ⇒ Publisher
Returns a new instance of Publisher.
11
12
13
|
# File 'lib/much-rails-pub-sub/publisher.rb', line 11
def initialize(event_name, event_params:)
@event = MuchRailsPubSub::Event.new(event_name, params: event_params)
end
|
Instance Attribute Details
#event ⇒ Object
Returns the value of attribute event.
9
10
11
|
# File 'lib/much-rails-pub-sub/publisher.rb', line 9
def event
@event
end
|
Instance Method Details
#event_id ⇒ Object
19
20
21
|
# File 'lib/much-rails-pub-sub/publisher.rb', line 19
def event_id
event.id
end
|
#event_name ⇒ Object
23
24
25
|
# File 'lib/much-rails-pub-sub/publisher.rb', line 23
def event_name
event.name
end
|
#event_params ⇒ Object
27
28
29
|
# File 'lib/much-rails-pub-sub/publisher.rb', line 27
def event_params
event.params
end
|
#on_call ⇒ Object
15
16
17
|
# File 'lib/much-rails-pub-sub/publisher.rb', line 15
def on_call
raise NotImplementedError
end
|