Parent

Merb::Slices::Loader

Load Slice classes before the app’s classes are loaded.

This allows the application to override/merge any slice-level classes.

Public Class Methods

app_paths() click to toggle source

App-level paths for all loaded slices.

@return Any app-level paths that have been loaded.

    # File lib/merb-slices.rb, line 71
71:       def app_paths
72:         paths = []
73:         Merb::Slices.each_slice { |slice| paths += slice.collected_app_paths }
74:         paths
75:       end
load_classes(*paths) click to toggle source

Load classes from given paths - using path/glob pattern.

@param *paths Array of paths to load classes from - may contain glob pattern

    # File lib/merb-slices.rb, line 50
50:       def load_classes(*paths)
51:         Merb::BootLoader::LoadClasses.load_classes paths
52:       end
load_file(file) click to toggle source

Load a single file and its requirements.

@param file The file to load.

    # File lib/merb-slices.rb, line 36
36:       def load_file(file)
37:         Merb::BootLoader::LoadClasses.load_file file
38:       end
reload_router!() click to toggle source

Reload the router - takes all_slices into account to load slices at runtime.

    # File lib/merb-slices.rb, line 55
55:       def reload_router!
56:         Merb::BootLoader::Router.reload!
57:       end
remove_classes_in_file(file) click to toggle source

Remove a single file and the classes loaded by it from ObjectSpace.

@param file The file to load.

    # File lib/merb-slices.rb, line 43
43:       def remove_classes_in_file(file)
44:         Merb::BootLoader::LoadClasses.remove_classes_in_file file
45:       end
run() click to toggle source

Gather all slices from search path and gems and load their classes.

    # File lib/merb-slices.rb, line 28
28:       def run
29:         Merb::Slices.register_slices_from_search_path! if auto_register?
30:         Merb::Slices.each_slice { |slice| slice.load_slice }
31:       end
slice_paths() click to toggle source

Slice-level paths for all loaded slices.

@return Any slice-level paths that have been loaded.

    # File lib/merb-slices.rb, line 62
62:       def slice_paths
63:         paths = []
64:         Merb::Slices.each_slice { |slice| paths += slice.collected_slice_paths }
65:         paths
66:       end

Private Class Methods

auto_register?() click to toggle source

Whether slices from search paths should be registered automatically. Defaults to true if not explicitly set.

    # File lib/merb-slices.rb, line 81
81:       def auto_register?
82:         Merb::Plugins.config[:merb_slices][:auto_register] || !Merb::Plugins.config[:merb_slices].key?(:auto_register)
83:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.