How about:
Dir["/path/to/directory/*.rb"].each {|file| require file }
More Related Contents:
- Get names of all files from a folder with Ruby
- How to check if a directory/file/symlink exists with one command in Ruby
- What is the difference between require_relative and require in Ruby?
- Why does Ruby 1.9.2 remove “.” from LOAD_PATH, and what’s the alternative?
- What is the difference between include and require in Ruby?
- Ruby’s File.open and the need for f.close
- How to create a file in Ruby
- How to avoid tripping over UTF-8 BOM when reading files
- Iterate through every file in one directory
- Ruby ‘require’ error: cannot load such file
- Read, edit, and write a text file line-wise using Ruby
- How to get the last character of a string in an array [closed]
- How to remove RVM (Ruby Version Manager) from my system
- Why use Ruby’s attr_accessor, attr_reader and attr_writer?
- Can’t install Ruby under Lion with RVM – GCC issues
- When to use symbols instead of strings in Ruby?
- How to find an item in array which has the most occurrences [duplicate]
- Why are we installing Ruby 1.9.2/1.9.3 gems into a 1.9.1 folder?
- Need to split arrays to sub arrays of specified size in Ruby [duplicate]
- Reading the last n lines of a file in Ruby?
- Why does Ruby have both private and protected methods?
- Is it possible to have Methods inside Methods?
- Library not loaded: /opt/local/lib/libssl.1.0.0.dylib (LoadError)
- Accessing elements of nested hashes in ruby [duplicate]
- How to read lines of a file in Ruby
- How do I redirect stderr and stdout to file for a Ruby script?
- Convert array of 2-element arrays into a hash, where duplicate keys append additional values
- How can I access a variable defined in a Ruby file I required in IRB?
- Ruby gem for finding timezone of location [closed]
- Ruby local variable is undefined