Sha256: 9b5e2ebd18b3779826b4296ce1403ba5c83bfa7698cfe757677a636d03482ae8
Contents?: true
Size: 705 Bytes
Versions: 16
Compression:
Stored size: 705 Bytes
Contents
module Vagrant # 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
16 entries across 16 versions & 2 rubygems