Conversation
yoshitsugu
reviewed
Aug 7, 2025
yoshitsugu
left a comment
There was a problem hiding this comment.
おおむねよさそうに思いました 👍 命名についてコメントしています。
03.bowling/bowling_method.rb
Outdated
| converted_array | ||
| end | ||
|
|
||
| def format_score(raw_scores) |
There was a problem hiding this comment.
format というと何か構造をもったもの(たとえばDate型の日付情報など)を文字列(2025-08-07など)に変換する処理を指すことが多いです。これはどちらかというと逆ですよね。
この場合はたとえば parse_scores とか to_int_scores(scores_string) みたいな感じになるかなと思います。
Owner
Author
There was a problem hiding this comment.
誤解を生む可能性がある命名であったため修正にて反映しました
formatはそのような場面で使用されるのですね(;'∀')
知らなかったですありがとうございます!
03.bowling/bowling_method.rb
Outdated
| @@ -0,0 +1,61 @@ | |||
| # frozen_string_literal: true | |||
|
|
|||
| def strings_to_numbers(scores) | |||
There was a problem hiding this comment.
このメソッド名だとただ文字列を数値にしているように見えるので、ボウリングのスコアのコンテキストでしか使えないものだと明示するような名前のほうがよいかなと思います。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
実行部分がメソッドに埋もれてしまっていたのでファイルを分割してあります。
レビューをお願いします。