aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/journey/visitors.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/journey/visitors.rb')
-rw-r--r--actionpack/lib/action_dispatch/journey/visitors.rb42
1 files changed, 21 insertions, 21 deletions
diff --git a/actionpack/lib/action_dispatch/journey/visitors.rb b/actionpack/lib/action_dispatch/journey/visitors.rb
index 306d2e674a..452dc84cc5 100644
--- a/actionpack/lib/action_dispatch/journey/visitors.rb
+++ b/actionpack/lib/action_dispatch/journey/visitors.rb
@@ -37,7 +37,7 @@ module ActionDispatch
@parameters.each do |index|
param = parts[index]
value = hash[param.name]
- return ''.freeze unless value
+ return "".freeze unless value
parts[index] = param.escape value
end
@@ -57,7 +57,7 @@ module ActionDispatch
private
- def visit node
+ def visit(node)
send(DISPATCH_CACHE[node.type], node)
end
@@ -97,7 +97,7 @@ module ActionDispatch
visit(node, seed)
end
- def visit node, seed
+ def visit(node, seed)
send(DISPATCH_CACHE[node.type], node, seed)
end
@@ -166,28 +166,28 @@ module ActionDispatch
class String < FunctionalVisitor # :nodoc:
private
- def binary(node, seed)
- visit(node.right, visit(node.left, seed))
- end
+ def binary(node, seed)
+ visit(node.right, visit(node.left, seed))
+ end
- def nary(node, seed)
- last_child = node.children.last
- node.children.inject(seed) { |s, c|
- string = visit(c, s)
- string << "|".freeze unless last_child == c
- string
- }
- end
+ def nary(node, seed)
+ last_child = node.children.last
+ node.children.inject(seed) { |s, c|
+ string = visit(c, s)
+ string << "|".freeze unless last_child == c
+ string
+ }
+ end
- def terminal(node, seed)
- seed + node.left
- end
+ def terminal(node, seed)
+ seed + node.left
+ end
- def visit_GROUP(node, seed)
- visit(node.left, seed << "(".freeze) << ")".freeze
- end
+ def visit_GROUP(node, seed)
+ visit(node.left, seed << "(".freeze) << ")".freeze
+ end
- INSTANCE = new
+ INSTANCE = new
end
class Dot < FunctionalVisitor # :nodoc: