spaces are ok在Ruby类、模块和方法名称中使用自然语言
空间还可以在Ruby类和方法名称中使用自然语言。像这样space_class ( \"Scorecard for a player\" ).new( \"Picard\" ).space_method ( \"Calculate the score from a game\", game )或者更短更漂亮ç ( \"Scorecard for a player\" ).new( \"Picard\" ).ƒ( \"Calculate the score from a game\", game )而不是机械和无聊ScorecardForPlayer.new( \"Picard\" ).calculate_new_score( game )或者信息量不大的Scorecard.new( \"Picard\" ).score( game )
下载地址
用户评论