Sha256: a80a971e5fa4cc8ecdd07e8c99c5b00163f10c2b567b73b2eb5cdaa8f96473cb

Contents?: true

Size: 328 Bytes

Versions: 2

Compression:

Stored size: 328 Bytes

Contents

Object.class_eval do

  def require_relative_directory(relative_directory_path)
    file_paths = Dir.glob(File.join(File.dirname(caller[0]), relative_directory_path, '*.{ru,rb}'))
    file_paths = file_paths.sort_by { |file_path| file_path.length }
    file_paths.each { |file_path| Loader::Utils.require(file_path) }
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
loader-3.1.0 lib/loader/core_ext/object.rb
loader-3.0.1 lib/loader/core_ext/object.rb