Extract variable out of loop
This commit is contained in:
parent
42da93ca30
commit
1ed6ff1006
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user