Module: ActiveSupport::Dependencies

Defined in:
lib/ember/appkit/rails/active_support/dependencies.rb

Instance Method Summary collapse

Instance Method Details

#autoloadable_module?(path_suffix) ⇒ Boolean

Returns:

  • (Boolean)


2
3
4
5
6
7
8
9
# File 'lib/ember/appkit/rails/active_support/dependencies.rb', line 2

def autoloadable_module?(path_suffix)
  autoload_paths.each do |load_path|
    path = File.join(load_path, path_suffix)
    return load_path if File.directory?(path) && Dir.glob(File.join(path, '**/*.rb')).present?
  end

  return false
end