def extract_metadata
      @metadata = {}

      convert do |current|
        current.each_line.drop_while do |line|
          next false if line !~ /^#\+([a-z_]+): (.*)/

          key, value = $1, $2
          @metadata[key.to_sym] = value
        end.join('')
      end
    end
def extract_metadata
      @metadata = {}

      convert do |current|
        current.each_line.drop_while do |line|
          next false if line !~ /^#\+([a-z_]+): (.*)/

          key, value = $1, $2
          @metadata[key.to_sym] = value
        end.join('')
      end
    end
Extract metadata from the document.