<commit_before># Public: Encapsulates a keikoku notification
#
# This is the entry point for dealing with notifications
#
# Examples
#
#   notification = Keikokuc::Notification.new(message: 'hello',
#                                             severity: 'info',
#                                             target: 'sunny-skies-42'
#                                             producer_api_key: 'abcd')
#   if notificaiton.publish
#     # persist notification
#   else
#     # handle error
#   end
#
class Keikokuc::Notification
  ATTRS = %w[message url severity
             target_name account_email
             producer_api_key remote_id errors].freeze

  attr_accessor *ATTRS

  # Public: class constructor
  #
  # opts - a hash of attributes to be set on constructed object
  #
  # Examples
  #
  #   notification = Keikokuc::Notification.new(message: 'hello')
  #
  # All keys on matching ATTRS will be set<commit_msg>Minor doc changes<commit_after># Public: Encapsulates a keikoku notification
#
# This is the entry point for dealing with notifications
#
# Examples
#
#   notification = Keikokuc::Notification.new(message: 'hello',
#                                             severity: 'info',
#                                             target: 'sunny-skies-42'
#                                             producer_api_key: 'abcd')
#   if notification.publish
#     # persist notification
#   else
#     # handle error
#   end
#
class Keikokuc::Notification
  ATTRS = %w[message url severity
             target_name account_email
             producer_api_key remote_id errors].freeze

  attr_accessor *ATTRS

  # Public: Initialize a notification
  #
  # opts - a hash of attributes to be set on constructed object
  #
  # Examples
  #
  #   notification = Keikokuc::Notification.new(message: 'hello')
  #
  # All keys on matching ATTRS will be set
{'fraction_non_alphanumeric': 0.07815845824411134, 'fraction_numerical': 0.0021413276231263384, 'mean_word_length': 2.014516129032258, 'pattern_counts': {'":': 0, '<': 3, '<?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': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2617820', 'n_tokens_mistral': 504, 'n_tokens_neox': 489, 'n_words': 146}