mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
19 lines
361 B
Ruby
19 lines
361 B
Ruby
|
|
# frozen_string_literal: true
|
||
|
|
|
||
|
|
module Notifications
|
||
|
|
class Create
|
||
|
|
attr_reader :user, :kind, :title, :content
|
||
|
|
|
||
|
|
def initialize(user:, kind:, title:, content:)
|
||
|
|
@user = user
|
||
|
|
@kind = kind
|
||
|
|
@title = title
|
||
|
|
@content = content
|
||
|
|
end
|
||
|
|
|
||
|
|
def call
|
||
|
|
Notification.create!(user:, kind:, title:, content:)
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|