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: exports.rb
    path of file: ./repos/manageiq/lib/task_helpers
    
    the code of the file until where you have to start completion: module TaskHelpers
  class Exports
    def self.safe_filename(filename, keep_spaces = false)
      new_filename = keep_spaces ? filename : filename.gsub(%r{[ ]}, '_')
      new_filename.gsub(%r{[|/]}, '/' => 'slash', '|' => 'pipe')
    end

    def self.parse_options
      require 'optimist'
      options = Optimist.options(EvmRake
    
    def self.parse_options
      require 'optimist'
      options = Optimist.options(EvmRakeHelper.extract_command_options) do
        opt :keep_spaces, 'Keep spaces in filenames', :type => :boolean, :short => 's', :default => false
        opt :directory, 'Directory to place exported files in', :type => :string, :required => true
        opt :all, 'Export read-only objects', :type => :boolean, :default => false
      end

      options[:directory] = File.absolute_path(options[:directory])

      error = validate_directory(options[:directory])
      Optimist.die :directory, error if error

      options
    end