Class Merb::BootLoader::Router
In: merb-core/lib/merb-core/bootloader.rb
Parent: Merb::BootLoader

Loads the router file. This needs to happen after everything else is loaded while merb is starting up to ensure the router has everything it needs to run.

Methods

router_file   run  

Public Class methods

Tries to find the router file.

Returns

String:The path to the router file if it exists, nil otherwise.

:api: private

[Source]

      # File merb-core/lib/merb-core/bootloader.rb, line 1073
1073:     def router_file
1074:       @router_file ||= begin
1075:         if File.file?(router = Merb.dir_for(:router) / Merb.glob_for(:router))
1076:           router
1077:         end
1078:       end
1079:     end

load the router file

Returns

nil

:api: plugin

[Source]

      # File merb-core/lib/merb-core/bootloader.rb, line 1061
1061:     def run
1062:       Merb::BootLoader::LoadClasses.load_file(router_file) if router_file
1063: 
1064:       nil
1065:     end

[Validate]