<commit_before>class Skein::Client::Subscriber < Skein::Connected
  # == Instance Methods =====================================================

  def initialize(queue_name, connection: nil, context: nil)
    super(connection: connection, context: context)

    @queue = self.channel.fanout(queue_name)
    @subscribe_queue = self.channel.queue('', exclusive: true)

    @subscribe_queue.bind(@queue)
  end

  def listen
    @subscribe_queue.subscribe(block: true) do |*args|
      yield(*args)
    end
  end
end<commit_msg>Adding notes on Subscriber interface<commit_after>class Skein::Client::Subscriber < Skein::Connected
  # == Instance Methods =====================================================

  def initialize(queue_name, connection: nil, context: nil)
    super(connection: connection, context: context)

    @queue = self.channel.fanout(queue_name)
    @subscribe_queue = self.channel.queue('', exclusive: true)

    @subscribe_queue.bind(@queue)
  end

  def listen
    @subscribe_queue.subscribe(block: true) do |*args|
      # REFACTOR: Fix decoding here on JSON payload
      # REFACTOR: Abstract out differences between Bunny and MarchHare
      yield(*args)
    end
  end
end
{'fraction_non_alphanumeric': 0.18592964824120603, 'fraction_numerical': 0.0, 'mean_word_length': 4.690476190476191, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4986750', 'n_tokens_mistral': 344, 'n_tokens_neox': 323, 'n_words': 84}