Sha256: 91c29b4508400342746f318bf7390bc574d49e5a5b5e019d1c9a91221846dc41

Contents?: true

Size: 430 Bytes

Versions: 21

Compression:

Stored size: 430 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: invite).call
      end
    end

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

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
pages_core-3.12.7 app/services/pages_core/destroy_invite_service.rb
pages_core-3.12.6 app/services/pages_core/destroy_invite_service.rb
pages_core-3.12.5 app/services/pages_core/destroy_invite_service.rb
pages_core-3.12.4 app/services/pages_core/destroy_invite_service.rb
pages_core-3.12.3 app/services/pages_core/destroy_invite_service.rb
pages_core-3.12.2 app/services/pages_core/destroy_invite_service.rb
pages_core-3.12.1 app/services/pages_core/destroy_invite_service.rb
pages_core-3.12.0 app/services/pages_core/destroy_invite_service.rb
pages_core-3.11.3 app/services/pages_core/destroy_invite_service.rb
pages_core-3.11.2 app/services/pages_core/destroy_invite_service.rb
pages_core-3.11.1 app/services/pages_core/destroy_invite_service.rb
pages_core-3.11.0 app/services/pages_core/destroy_invite_service.rb
pages_core-3.10.2 app/services/pages_core/destroy_invite_service.rb
pages_core-3.10.1 app/services/pages_core/destroy_invite_service.rb
pages_core-3.9.2 app/services/pages_core/destroy_invite_service.rb
pages_core-3.9.1 app/services/pages_core/destroy_invite_service.rb
pages_core-3.9.0 app/services/pages_core/destroy_invite_service.rb
pages_core-3.8.3 app/services/pages_core/destroy_invite_service.rb
pages_core-3.8.2 app/services/pages_core/destroy_invite_service.rb
pages_core-3.8.1 app/services/pages_core/destroy_invite_service.rb