You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: email_domain_blocks.rb
    path of file: ./repos/mastodon/lib/mastodon/cli
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'concurrent'
require_relative 'base'

module Mastodon::CLI
  class EmailDomainBlocks < Base
    desc 'list', 'List blocked e-mail domains'
    def list
      EmailDomainBlock.where(parent_id: nil).find_each do |entry|
        say(entry.domain.to_s, :white)

        EmailDomainBlock.where(parent_id: entry.id).f
    
    def remove(*domains)
      fail_with_message 'No domain(s) given' if domains.empty?

      skipped = 0
      processed = 0
      failed = 0

      domains.each do |domain|
        entry = EmailDomainBlock.find_by(domain: domain)

        if entry.nil?
          say("#{domain} is not yet blocked.", :yellow)
          skipped += 1
          next
        end

        children_count = EmailDomainBlock.where(parent_id: entry.id).count
        result = entry.destroy

        if result
          processed += children_count + 1
        else
          say("#{domain} could not be unblocked.", :red)
          failed += 1
        end
      end

      say("Removed #{processed}, skipped #{skipped}, failed #{failed}", color(processed, failed))
    end