title: How to get a list of files in a directory with Ruby?
body: <p>Here's what I have so far:</p>
  
  <pre><code>class FileRenamer
      def RenameFiles(folder_path)
          baseDirectory = folder_path
  
          files = Dir.glob("*")
      end
  end
  
  puts "Renaming files..."
  
  renamer = FileRenamer.new()
  files = renamer.RenameFiles("/home/papuccino1/Desktop/Test")
  puts files
  
  puts "Renaming complete."
  </code></pre>
  
  <p>The problem is that it seems to be getting files on the directory where my .rb file is running from.</p>
  
  <p>How can I set the directory to where I want it to be? Notice I have the baseDirectory variable there.</p>