<commit_before># frozen_string_literal: true
# Helper class for the MailAccount model
# rubocop:disable Metrics/ClassLength
class MailAccount
  # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
  def initialize(params = {})
    @id = params.fetch(:id, 0)
    @email = params.fetch(:email, '')
    @realname = params.fetch(:realname, '')
    @quota = params.fetch(:quota, 0)
    @quota_sieve_script = params.fetch(:quota_sieve_script, 0)
    @quota_sieve_actions = params.fetch(:quota_sieve_actions, 0)
    @quota_sieve_redirects = params.fetch(:quota_sieve_redirects, 0)
    @receiving_enabled = params.fetch(:receiving_enabled, false)
    @created_at = params.fetch(:created_at, Time.now.to_i)
    @updated_at = params.fetch(:updated_at, Time.now.to_i)
    @enabled = params.fetch(:enabled, false)
    @domain_opts = {}
    @mail_alias_opts = {}
    @mail_source_opts = {}
  end

  attr_accessor :id, :email, :realname, :quota, :quota_sieve_script,
                :quota_sieve_actions, :quota_sieve_redirects,
                :receiving_enabled, :created_at, :updated_at, :enabled,
                :domain_opts, :mail_alias_opts, :mail_source_opts

  # @return [FormFieldSet]
  def field_set
    visible = []<commit_msg>add some default values for mailaccount<commit_after># frozen_string_literal: true
# Helper class for the MailAccount model
# rubocop:disable Metrics/ClassLength
class MailAccount
  # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
  def initialize(params = {})
    @id = params.fetch(:id, 0)
    @email = params.fetch(:email, '')
    @realname = params.fetch(:realname, '')
    @quota = params.fetch(:quota, 10_485_760)
    @quota_sieve_script = params.fetch(:quota_sieve_script, 10_240)
    @quota_sieve_actions = params.fetch(:quota_sieve_actions, 32)
    @quota_sieve_redirects = params.fetch(:quota_sieve_redirects, 4)
    @receiving_enabled = params.fetch(:receiving_enabled, false)
    @created_at = params.fetch(:created_at, Time.now.to_i)
    @updated_at = params.fetch(:updated_at, Time.now.to_i)
    @enabled = params.fetch(:enabled, false)
    @domain_opts = {}
    @mail_alias_opts = {}
    @mail_source_opts = {}
  end

  attr_accessor :id, :email, :realname, :quota, :quota_sieve_script,
                :quota_sieve_actions, :quota_sieve_redirects,
                :receiving_enabled, :created_at, :updated_at, :enabled,
                :domain_opts, :mail_alias_opts, :mail_source_opts

  # @return [FormFieldSet]
  def field_set
    visible = []
{'fraction_non_alphanumeric': 0.12014417300760913, 'fraction_numerical': 0.00881057268722467, 'mean_word_length': 4.161157024793388, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6689289', 'n_tokens_mistral': 892, 'n_tokens_neox': 858, 'n_words': 151}