mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-12 10:11:38 -05:00
17 lines
327 B
Ruby
17 lines
327 B
Ruby
|
|
# frozen_string_literal: true
|
||
|
|
|
||
|
|
class Notifications::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
|