summaryrefslogtreecommitdiff
path: root/bocelli/base.rb
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2014-08-18 21:39:05 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2014-08-18 21:39:05 -0700
commit2af0cbd96d523b9ed6c4489e2dc71ca23c757d42 (patch)
tree84712ccfd7fa97d95f8de696cee2ecd0df047fb6 /bocelli/base.rb
parent5900db6fa61e2c6537e6a33bd3be61d50812c5a6 (diff)
downloadbocelli-2af0cbd96d523b9ed6c4489e2dc71ca23c757d42.tar.gz
bocelli-2af0cbd96d523b9ed6c4489e2dc71ca23c757d42.tar.xz
Move matching/detection logic to modules.
Diffstat (limited to 'bocelli/base.rb')
-rw-r--r--bocelli/base.rb2
1 files changed, 1 insertions, 1 deletions
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