private string GetControllerFilePath(string controllerName) { var fileName = Constants.ControllerPascalPathFormat.FormattedWith(controllerName.Pascalize()); if (_pathProvider.FileExists(fileName)) { return(fileName); } fileName = Constants.ControllerUnderscorePathFormat.FormattedWith(controllerName.Underscore()); return(_pathProvider.FileExists(fileName) ? fileName : string.Empty); }
private static void ProcessRubyRoutes(IRubyEngine engine, IPathProvider vpp, string routesPath) { if (!vpp.FileExists(routesPath)) { return; } var routeCollection = new RubyRoutes(RouteTable.Routes); engine.DefineReadOnlyGlobalVariable("routes", routeCollection); engine.RequireRubyFile(routesPath, ReaderType.File); }
public override bool FileExists(string path) { return(_pathProvider.FileExists(path)); }