just_add_watir | Advanced recipes for Watir
28Jul/08Off

Q. How do I require all ruby files in the current directory?

A. Iterate over the directory using the File class ...
Example watir:

dir = File.dirname(__FILE__)
 Dir[File.expand_path("#{dir}/*.rb")].uniq.each do |file|
  require file
 end
Tagged as: , Comments Off
Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.