提交 f8788806 编写于 作者: B Ben Orenstein

Simplify boolean logic into ternary.

上级 54b0aeba
......@@ -113,7 +113,7 @@ def delegate(*methods)
raise ArgumentError, "Can only automatically set the delegation prefix when delegating to a method."
end
prefix = options[:prefix] && "#{options[:prefix] == true ? to : options[:prefix]}_" || ''
prefix = options[:prefix] ? "#{options[:prefix] == true ? to : options[:prefix]}_" : ''
file, line = caller.first.split(':', 2)
line = line.to_i
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册