Merb::BootLoader
Load Slice classes before the app’s classes are loaded.
This allows the application to override/merge any slice-level classes.
App-level paths for all loaded slices.
@return <Array> Any app-level paths that have been loaded.
# File lib/merb-slices.rb, line 71 def app_paths paths = [] Merb::Slices.each_slice { |slice| paths += slice.collected_app_paths } paths end
Load classes from given paths - using path/glob pattern.
@param *paths <Array> Array of paths to load classes from - may contain glob pattern
# File lib/merb-slices.rb, line 50 def load_classes(*paths) Merb::BootLoader::LoadClasses.load_classes paths end
Load a single file and its requirements.
@param file<String> The file to load.
# File lib/merb-slices.rb, line 36 def load_file(file) Merb::BootLoader::LoadClasses.load_file file end
Reload the router - takes all_slices into account to load slices at runtime.
# File lib/merb-slices.rb, line 55 def reload_router! Merb::BootLoader::Router.reload! end
Remove a single file and the classes loaded by it from ObjectSpace.
@param file<String> The file to load.
# File lib/merb-slices.rb, line 43 def remove_classes_in_file(file) Merb::BootLoader::LoadClasses.remove_classes_in_file file end
Gather all slices from search path and gems and load their classes.
# File lib/merb-slices.rb, line 28 def run Merb::Slices.register_slices_from_search_path! if auto_register? Merb::Slices.each_slice { |slice| slice.load_slice } end
Slice-level paths for all loaded slices.
@return <Array> Any slice-level paths that have been loaded.
# File lib/merb-slices.rb, line 62 def slice_paths paths = [] Merb::Slices.each_slice { |slice| paths += slice.collected_slice_paths } paths end
Generated with the Darkfish Rdoc Generator 2.