Sha256: 7e912eeb4d3e23bed3049911718a0a047c55dd067f4844f089612086e5329b7b

Contents?: true

Size: 1.39 KB

Versions: 54

Compression:

Stored size: 1.39 KB

Contents

# frozen_string_literal: true

module EmailData
  module Source
    class FileSystem
      def self.tlds
        @tlds ||= load_file("tlds.txt")
      end

      def self.slds
        @slds ||= load_file("slds.txt")
      end

      def self.country_tlds
        @country_tlds ||= load_file("country_tlds.txt")
      end

      def self.disposable_emails
        @disposable_emails ||= load_file("disposable_emails.txt")
      end

      def self.disposable_domains
        @disposable_domains ||= load_file("disposable_domains.txt")
      end

      def self.disposable_domains_with_mx
        @disposable_domains_with_mx ||=
          load_file("disposable_domains_with_mx.txt")
      end

      def self.disposable_domains_without_mx
        @disposable_domains_without_mx ||=
          load_file("disposable_domains_without_mx.txt")
      end

      def self.free_email_domains
        @free_email_domains ||= load_file("free_email_domains.txt")
      end

      def self.roles
        @roles ||= load_file("roles.txt")
      end

      def self.private_relays
        @private_relays ||= load_file("private_relays.txt")
      end

      def self.dnsbls
        @dnsbls ||= load_file("dnsbls.txt")
      end

      def self.load_file(filename)
        EmailData
          .data_dir
          .join(filename)
          .read
          .lines
          .map(&:chomp)
          .reject(&:empty?)
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
email_data-1719707264.0.0 lib/email_data/source/file_system.rb
email_data-1719102479.0.0 lib/email_data/source/file_system.rb
email_data-1718497648.0.0 lib/email_data/source/file_system.rb
email_data-1717892896.0.0 lib/email_data/source/file_system.rb
email_data-1717288066.0.0 lib/email_data/source/file_system.rb
email_data-1714868851.0.0 lib/email_data/source/file_system.rb
email_data-1714264088.0.0 lib/email_data/source/file_system.rb
email_data-1713659230.0.0 lib/email_data/source/file_system.rb
email_data-1713054653.0.0 lib/email_data/source/file_system.rb
email_data-1712449687.0.0 lib/email_data/source/file_system.rb
email_data-1711844871.0.0 lib/email_data/source/file_system.rb
email_data-1711240075.0.0 lib/email_data/source/file_system.rb
email_data-1710635221.0.0 lib/email_data/source/file_system.rb
email_data-1710030441.0.0 lib/email_data/source/file_system.rb
email_data-1709425613.0.0 lib/email_data/source/file_system.rb
email_data-1708820814.0.0 lib/email_data/source/file_system.rb
email_data-1708216007.0.0 lib/email_data/source/file_system.rb
email_data-1707611231.0.0 lib/email_data/source/file_system.rb
email_data-1707006417.0.0 lib/email_data/source/file_system.rb
email_data-1706401639.0.0 lib/email_data/source/file_system.rb