Class: RailsRunner::Notifications
- Inherits:
-
Object
- Object
- RailsRunner::Notifications
show all
- Defined in:
- lib/rails_runner/notifications.rb,
lib/rails_runner/notifications/sql.rb,
lib/rails_runner/notifications/default.rb,
lib/rails_runner/notifications/process_action.rb,
lib/rails_runner/notifications/render_partial.rb,
lib/rails_runner/notifications/render_template.rb
Defined Under Namespace
Classes: Default, ProcessAction, RenderDefault, RenderPartial, RenderTemplate, Sql
Constant Summary
collapse
- DEFAULT_NOTIFICATION =
Default.new
Class Method Summary
collapse
Class Method Details
.add_notification(name, notification) ⇒ Object
6
7
8
9
|
# File 'lib/rails_runner/notifications.rb', line 6
def add_notification(name, notification)
@notifications ||= {}
@notifications[name] = notification.new
end
|
.to_action(request, name, payload) ⇒ Object
11
12
13
14
|
# File 'lib/rails_runner/notifications.rb', line 11
def to_action(request, name, payload)
notification = @notifications[name] || DEFAULT_NOTIFICATION
notification.to_action(request, payload)
end
|