Skip to content

Commit

Permalink
Minor tidyup.
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinlaking committed Sep 27, 2015
1 parent 788258c commit ec784ef
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions lib/vedeu/output/wordwrap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,15 @@ def content
def prune
return text if text.size <= pruned_width

processed = []

if split_lines.size > 1
processed = split_lines.reduce([]) do |acc, line|
processed = if split_lines.size > 1
split_lines.reduce([]) do |acc, line|
acc << ellipsis_string(line)
end

else
processed = ellipsis_string(text)
ellipsis_string(text)

end

processed
end

# @return [String]
Expand All @@ -75,9 +71,7 @@ def wrap
processed << reformatted
end

processed.reduce([]) do |output, line|
output << line.join(' ')
end
processed.reduce([]) { |output, line| output << line.join(' ') }
end

protected
Expand Down

0 comments on commit ec784ef

Please sign in to comment.