Sha256: 71c0f8b15deebcc0c43cccf3bad36542c980948e7c851782d66729b67ab88651

Contents?: true

Size: 294 Bytes

Versions: 9

Compression:

Stored size: 294 Bytes

Contents

module Kernel

  def require_relative_all(paths, sub = nil)
    main_path = File.dirname(caller.first.sub(/:\d+$/, ''))
    main_path = File.join(main_path, sub) if sub

    [*paths].each do |path|
      Dir[File.join(main_path, path, '*.rb')].each { |file| require file }
    end
  end

end


Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
locomotivecms_common-0.4.0 lib/locomotive/common/core_ext/kernel.rb
locomotivecms_common-0.3.1 lib/locomotive/common/core_ext/kernel.rb
locomotivecms_common-0.3.0 lib/locomotive/common/core_ext/kernel.rb
locomotivecms_common-0.2.0 lib/locomotive/common/core_ext/kernel.rb
locomotivecms_common-0.1.0 lib/locomotive/common/core_ext/kernel.rb
locomotivecms_common-0.0.5 lib/locomotive/common/core_ext/kernel.rb
locomotivecms_common-0.0.4 lib/locomotive/common/core_ext/kernel.rb
locomotivecms_common-0.0.3 lib/locomotive/common/core_ext/kernel.rb
locomotivecms_steam-1.0.0.pre.alpha lib/locomotive/steam/core_ext/kernel.rb