Is there a way to load files that only match a specific string? For example, suppose I want to load files that matches account1.rb account2.rb and so on. I want to be able to do something like
require File.expand_path("../account*.rb", __FILE__)
but of course this does not work. What is the best way to do this?
You can do the same thing with a loop:
The
expand_pathmethod only resolves paths. It does not expand wildcards.