This object defines a path from which Constants can be loaded.

Methods
Public Class methods
new(root)

Create a new load path with the filesystem path

     # File vendor/rails/activesupport/lib/active_support/dependencies.rb, line 136
136:     def initialize(root) @root = root end
Public Instance methods
const_name_to_file_name(name)
     # File vendor/rails/activesupport/lib/active_support/dependencies.rb, line 154
154:     def const_name_to_file_name(name)
155:       name.to_s.underscore + '.rb'
156:     end
const_name_to_module_name(name)
     # File vendor/rails/activesupport/lib/active_support/dependencies.rb, line 158
158:     def const_name_to_module_name(name)
159:       name.to_s.underscore
160:     end
filesystem_path(path, allow_module=true)

Return nil if the path does not exist, or the path to a directory if the path leads to a module, or the path to a file if it leads to an object.

     # File vendor/rails/activesupport/lib/active_support/dependencies.rb, line 140
140:     def filesystem_path(path, allow_module=true)
141:       fs_path = [@root]
142:       fs_path += path[0..-2].collect {|name| const_name_to_module_name name}
143: 
144:       if allow_module
145:         result = File.join(fs_path, const_name_to_module_name(path.last))
146:         return result if File.directory? result # Return the module path if one exists
147:       end
148: 
149:       result = File.join(fs_path, const_name_to_file_name(path.last))
150: 
151:       return File.file?(result) ? result : nil
152:     end