Sha256: 260e85befaa6bc63727e84925ffb94032fd6f4ea33199e91f0a373c1b376d4d3

Contents?: true

Size: 489 Bytes

Versions: 19

Compression:

Stored size: 489 Bytes

Contents

# require "eitil_core/kernel/loadquire"

Kernel.module_eval do

  def loadquire(current_path, *relative_paths, ext: '.rb')
    
    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

Version Path
eitil-2.0.8 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-2.0.7 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-2.0.6 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-2.0.5 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-2.0.4 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-2.0.3 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-2.0.2 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-2.0.1 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-2.0.0 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-1.4.1 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-1.4.0 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-1.3.12 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-1.3.11 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-1.3.10 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-1.3.9 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-1.3.8 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-1.3.7 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-1.3.6 eitil_core/lib/eitil_core/kernel/loadquire.rb
eitil-1.3.5 eitil_core/lib/eitil_core/kernel/loadquire.rb