class Alki::Reload::LoaderHandler

Public Class Methods

new(root_dir) click to toggle source
# File lib/alki/reload/loader_handler.rb, line 6
def initialize(root_dir)
  @root_dir = File.join(root_dir,'')
end

Public Instance Methods

dirs() click to toggle source
# File lib/alki/reload/loader_handler.rb, line 21
def dirs
  Alki::Loader.registered_paths.select do |d|
    d.start_with?(@root_dir)
  end
end
handle_path(path) click to toggle source
# File lib/alki/reload/loader_handler.rb, line 10
def handle_path(path)
  dirs.each do |dir|
    dir = File.join(dir,'')
    if path.start_with? dir
      name = Alki::Loader.lookup_name path
      return name if name
    end
  end
  nil
end