Sha256: 4c7fd990a3e45c47bd196f84b3015fbd929bdce47098718e2e949ba78def8fff

Contents?: true

Size: 1.32 KB

Versions: 303

Compression:

Stored size: 1.32 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.load_file(filename)
        EmailData
          .data_dir
          .join(filename)
          .read
          .lines
          .map(&:chomp)
          .reject(&:empty?)
      end
    end
  end
end

Version data entries

303 entries across 303 versions & 1 rubygems

Version Path
email_data-1697329714.0.0 lib/email_data/source/file_system.rb
email_data-1696724921.0.0 lib/email_data/source/file_system.rb
email_data-1696494936.0.0 lib/email_data/source/file_system.rb
email_data-1696120045.0.0 lib/email_data/source/file_system.rb
email_data-1695515208.0.0 lib/email_data/source/file_system.rb
email_data-1695406680.0.0 lib/email_data/source/file_system.rb
email_data-1694910495.0.0 lib/email_data/source/file_system.rb
email_data-1694305650.0.0 lib/email_data/source/file_system.rb
email_data-1693700838.0.0 lib/email_data/source/file_system.rb
email_data-1693096010.0.0 lib/email_data/source/file_system.rb
email_data-1692491201.0.0 lib/email_data/source/file_system.rb
email_data-1691886470.0.0 lib/email_data/source/file_system.rb
email_data-1691281706.0.0 lib/email_data/source/file_system.rb
email_data-1690676894.0.0 lib/email_data/source/file_system.rb
email_data-1690072122.0.0 lib/email_data/source/file_system.rb
email_data-1689467392.0.0 lib/email_data/source/file_system.rb
email_data-1688862479.0.0 lib/email_data/source/file_system.rb
email_data-1688257664.0.0 lib/email_data/source/file_system.rb
email_data-1687652927.0.0 lib/email_data/source/file_system.rb
email_data-1687048036.0.0 lib/email_data/source/file_system.rb