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: xor.rb
    path of file: ./repos/metasploit-framework/lib/msf/core/encoder
    
    the code of the file until where you have to start completion: # -*- coding: binary -*-

###
#
# This class provides basic XOR encoding of buffers.
#
###
class Msf::Encoder::Xor < Msf::Encoder

  #
  # Encodes a bl
    
  def encode_block(state, block)
    encoder = case state.decoder_key_size
      when Rex::Encoding::Xor::Qword.keysize then Rex::Encoding::Xor::Qword
      when Rex::Encoding::Xor::Dword.keysize then	Rex::Encoding::Xor::Dword
      when Rex::Encoding::Xor::Word.keysize then Rex::Encoding::Xor::Word
      when Rex::Encoding::Xor::Byte.keysize then Rex::Encoding::Xor::Byte
      else Rex::Encoding::Xor::Dword
    end