hummingbird-me/kitsu-server

View on GitHub
app/services/getstream_webhook_parser.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class GetstreamWebhookParser
  def initialize(data)
    @data = data
  end

  def each
    @data.each do |feed|
      feed['new'].each do |activity|
        yield feed['feed'], :new, activity
      end
      feed['deleted'].each do |activity|
        yield feed['feed'], :deleted, activity
      end
    end
  end
end