From 2af0cbd96d523b9ed6c4489e2dc71ca23c757d42 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 18 Aug 2014 21:39:05 -0700 Subject: Move matching/detection logic to modules. --- bocelli/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bocelli/base.rb') diff --git a/bocelli/base.rb b/bocelli/base.rb index e4998c1..990a819 100644 --- a/bocelli/base.rb +++ b/bocelli/base.rb @@ -62,7 +62,7 @@ module Bocelli if $3 =~ /\A(\S+) (.*)/ if (mod = Hash[@modules.map { |k, v| [k.to_s, v] }][$1]) - if (match = mod.routes.detect { |k, _| match($2, k) }) + if (match = mod.match($2)) route, block = match return new(str, route, block, metadata).execute -- cgit v1.2.3-70-g09d2