Skip to content

Commit

Permalink
Refactor parse_row method to use more concise syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
flori committed Jul 27, 2024
1 parent 9097e8e commit 6c9c96c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/term/ansicolor/ppm_reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ def to_s
private

def parse_row
row = []
@width.times do
row << parse_next_pixel
end
row
@width.times.map { parse_next_pixel }
end

def parse_next_pixel
Expand Down

0 comments on commit 6c9c96c

Please sign in to comment.