I'm creating a program to create folder structure from the text file. In that I need to get the spaces that comes before any word in the given line. How can I implement this functionality in ruby without opening String class? I come from C# and it's very easy to extract methods in it. But I don't know how rubyists approach the same problem!I'm creating a program to create folder structu