Sha256: 48362f969a47a8471e0d9d97dcf8d3d1c1e541ed42ceca48f3bf7bf4d4242800
Contents?: true
Size: 708 Bytes
Versions: 11
Compression:
Stored size: 708 Bytes
Contents
module VirtualBox # Eases the processes of loading specific files then globbing # the rest from a specified directory. module GlobLoader # Glob requires all ruby files in a directory, optionally loading select # files initially (since others may depend on them). # # @param [String] dir The directory to glob # @param [Array<String>] initial_files Initial files (relative to `dir`) # to load def self.glob_require(dir, initial_files=[]) initial_files.each do |file| require File.expand_path(file, dir) end # Glob require the rest Dir[File.join(dir, "**", "*.rb")].each do |f| require File.expand_path(f) end end end end
Version data entries
11 entries across 11 versions & 2 rubygems