Sha256: bf123bf9e4265862ff32adcf06448a45d5d820443a0f3ca07e3129d5aa399044
Contents?: true
Size: 337 Bytes
Versions: 33
Compression:
Stored size: 337 Bytes
Contents
module Backports def self.require_relative_dir dir = caller.first.split(/\.rb:\d/,2).first short_path = dir[/.*(backports\/.*)/, 1] << '/' Dir.entries(dir). map{|f| Regexp.last_match(1) if /^(.*)\.rb$/ =~ f}. compact. sort. each do |f| require short_path + f end end end
Version data entries
33 entries across 33 versions & 4 rubygems