From a4bb306ea8ea71ebc5f64d3b29ee939af551979f Mon Sep 17 00:00:00 2001 From: Rikuoh Date: Tue, 16 Apr 2024 20:06:34 +0900 Subject: [PATCH] ls 1.0 --- ls.rb | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/ls.rb b/ls.rb index 2abce11..4b7a1d6 100644 --- a/ls.rb +++ b/ls.rb @@ -10,12 +10,6 @@ def run(files) arranged(filled) end -# def serve(files) -# Dir.glob('*').each do |file| -# files = file -# end -# end - def serve(files) files.concat(Dir.glob('*')) end @@ -48,22 +42,3 @@ def arranged(filled) end run(files) - -# ls.rb:13:11: W: [Correctable] Lint/UnusedMethodArgument: Unused method argument - files. If it's necessary, use _ or _files as an argument name to indicate that it won't be used. If it's unnecessary, remove it. You can also write as serve(*) if you want the method to accept any arguments but don't care about them. -# def serve(files) -# ls.rb:27:27: C: [Correctable] Style/SymbolProc: Pass &:size as an argument to map instead of a block. -# array_size = sliced.map { |array| array.size }.max -# ^^^^^^^^^^^^^^^^^^^^^^ -# ls.rb:34:1: C: Metrics/AbcSize: Assignment Branch Condition size for arranged is too high. [<5, 20, 6> 21.47/17] -# def arranged(filled) ... -# ^^^^^^^^^^^^^^^^^^^^ -# ls.rb:34:1: C: Metrics/MethodLength: Method has too many lines. [14/10] -# def arranged(filled) ... -# ^^^^^^^^^^^^^^^^^^^^ -# ls.rb:35:33: C: [Correctable] Style/SymbolProc: Pass &:size as an argument to map instead of a block. -# element2 = filled.flatten.map { |array| array.size }.max -# ^^^^^^^^^^^^^^^^^^^^^^ -# ls.rb:43:32: W: Lint/ShadowingOuterLocalVariable: Shadowing outer local variable - arrange. -# arrange.compact.each do |arrange| -# ^^^^^^^ -