Codeminer42/cm42-central

View on GitHub
app/operations/story_operations/pusher_notification.rb

Summary

Maintainability
A
0 mins
Test Coverage
module StoryOperations
  class PusherNotification
    def self.notify_changes(story)
      new(story).notify_changes
    end

    def initialize(story)
      @story = story
    end

    def notify_changes
      ::PusherNotificationWorker.perform_async(channel_name)
    end

    private

    attr_reader :story

    def channel_name
      "project-board-#{story.project_id}"
    end
  end
end