def collect_load_paths(modify_load_path = true, push_merb_path = true)
self.collected_slice_paths.clear; self.collected_app_paths.clear
Merb.push_path("#{self.name.snake_case}_file""#{self.name.snake_case}_file", File.dirname(self.file), File.basename(self.file))
self.collected_app_paths << self.file
self.slice_paths.each do |component, path|
if File.directory?(component_path = path.first)
$LOAD_PATH.unshift(component_path) if modify_load_path && component.in?(:model, :controller, :lib) && !$LOAD_PATH.include?(component_path)
self.collected_slice_paths << path.first / path.last if path.last
if (app_glob = self.app_glob_for(component)) && File.directory?(app_component_dir = self.app_dir_for(component))
self.collected_app_paths << app_component_dir / app_glob
Merb.push_path("#{self.name.snake_case}_#{component}""#{self.name.snake_case}_#{component}", app_component_dir, app_glob) if push_merb_path
end
end
end
end