Sha256: 46c07d1c7e2ba0db78ec8358da1d7f574353e2eedfdb97e061c72eb7e03322ad
Contents?: true
Size: 543 Bytes
Versions: 19
Compression:
Stored size: 543 Bytes
Contents
# require "eitil_core/kernel/loadquire_bang" Kernel.module_eval do def loadquire!(*relative_paths, ext: '.rb') current_path = caller.first.split('/')[0..-2].join('/') file_paths = relative_paths.map do |relative_path| File.expand_path(relative_path, current_path).concat(ext) end if Object.const_defined?('Rails') && Rails.env.development? file_paths.each do |path| load(path) end else file_paths.each do |path| require(path) end end end end
Version data entries
19 entries across 19 versions & 1 rubygems