Sha256: 49ccf8d224ecb44c9dc0fa7605f1f234b217442c119c488453694824d0d6dc0e

Contents?: true

Size: 416 Bytes

Versions: 7

Compression:

Stored size: 416 Bytes

Contents

# frozen_string_literal: true

module PagesCore
  class DestroyInviteService
    attr_reader :invite

    def initialize(invite:)
      @invite = invite
    end

    class << self
      def call(invite:)
        new(invite:).call
      end
    end

    def call
      Invite.transaction do
        invite.destroy
        PagesCore::PubSub.publish(:destroy_invite, invite:)
        invite
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pages_core-3.15.5 app/services/pages_core/destroy_invite_service.rb
pages_core-3.15.4 app/services/pages_core/destroy_invite_service.rb
pages_core-3.15.3 app/services/pages_core/destroy_invite_service.rb
pages_core-3.15.2 app/services/pages_core/destroy_invite_service.rb
pages_core-3.15.1 app/services/pages_core/destroy_invite_service.rb
pages_core-3.14.0 app/services/pages_core/destroy_invite_service.rb
pages_core-3.13.0 app/services/pages_core/destroy_invite_service.rb