From 2c8cff45b0d9e7d98be9dc3e928cee07ab3ce0dd Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Tue, 22 Dec 2020 09:45:12 -0800 Subject: [PATCH] [2020][ruby][20.x] refactor --- 2020/ruby/day_20.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/2020/ruby/day_20.rb b/2020/ruby/day_20.rb index bc0e80d..343a9be 100644 --- a/2020/ruby/day_20.rb +++ b/2020/ruby/day_20.rb @@ -28,10 +28,7 @@ class Tile end def rotated - self.class.new( - @id, - @raw.map {|row| [row].transpose }.reverse.inject(&:zip).map(&:flatten), - ) + self.class.new(@id, @raw.reverse.transpose) end def flipped