提交 1ed6ff10 编写于 作者: V Vipul A M

Extract variable out of loop

上级 42da93ca
......@@ -46,8 +46,9 @@ def format_paragraph(text, len = 72, indent = 2)
end
end
indentation = " " * indent
sentences.map { |sentence|
"#{" " * indent}#{sentence.join(' ')}"
"#{indentation}#{sentence.join(' ')}"
}.join "\n"
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册