def each_with_depth(from: nil, to: nil, &block)
      Array(lines).each_with_index do |line, index|
        next if index < (from || 0)

        depth = line.length - line.lstrip.length
        block.call(line.strip, depth, index)

        break if to == index
      end

      nil
    end
def each_with_depth(from: nil, to: nil, &block)
      Array(lines).each_with_index do |line, index|
        next if index < (from || 0)

        depth = line.length - line.lstrip.length
        block.call(line.strip, depth, index)

        break if to == index
      end

      nil
    end
Iterate over the lines with a depth, and passed the stripped line to the passed block