build_path doesn't need the path variable anymore

It just constructs a Path::Pattern object with the AST that it already
has
This commit is contained in:
Aaron Patterson 2015-08-13 15:44:15 -07:00
parent 947ebe9a6d
commit 95a5d177cc

@ -528,7 +528,7 @@ def add_route(app, conditions, requirements, defaults, name, anchor)
path = conditions.delete :path_info
ast = conditions.delete :parsed_path_info
required_defaults = conditions.delete :required_defaults
path = build_path(path, ast, requirements, anchor)
path = build_path(ast, requirements, anchor)
conditions = build_conditions(conditions)
route = @set.add_route(app, path, conditions, required_defaults, defaults, name)
@ -536,7 +536,7 @@ def add_route(app, conditions, requirements, defaults, name, anchor)
route
end
def build_path(path, ast, requirements, anchor)
def build_path(ast, requirements, anchor)
pattern = Journey::Path::Pattern.new(ast, requirements, SEPARATORS, anchor)
builder = Journey::GTG::Builder.new ast