{"author_name":"yokoyantech","categories":["ruby","RuboCop"],"provider_url":"https://hatena.blog","height":"190","blog_url":"https://www.yokoyan.net/","description":"\u306f\u3058\u3081\u306b Rubocop\u3067\u898b\u6163\u308c\u306a\u3044\u6307\u6458\u3092\u53d7\u3051\u305f\u306e\u3067\u30e1\u30e2\u3002 \u30d0\u30fc\u30b8\u30e7\u30f3 rubocop 0.49.1 \u30a8\u30e9\u30fc\u5185\u5bb9 \u5909\u6570\u306e\u6bd4\u8f03\u3068\u4ee3\u5165\u306f\u3001\u6761\u4ef6\u5f0f\u306e\u623b\u308a\u5024\u3092\u4f7f\u3046\u3079\u3057\u3002 Use the return of the conditional for variable assignment and comparison. \u30c0\u30e1\u306a\u30b3\u30fc\u30c9\u4f8b \u79c1\u306fJava\u3067\u80b2\u3063\u305f\u306e\u3067\u3001\u3064\u3044\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3057\u307e\u3046\u3002 if @user.type == Settings.user.user_type.standard msg = t('message.hogehoge') else msg = t('message.fug\u2026","type":"rich","title":"\u3010Rubocop\u3011Use the return of the conditional for variable assignment and comparison.\u30a8\u30e9\u30fc\u306e\u5bfe\u51e6\u6cd5","author_url":"https://blog.hatena.ne.jp/yokoyantech/","published":"2019-03-08 18:00:00","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/y/yokoyantech/20190308/20190308164352.png","url":"https://www.yokoyan.net/entry/2019/03/08/180000","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.yokoyan.net%2Fentry%2F2019%2F03%2F08%2F180000\" title=\"\u3010Rubocop\u3011Use the return of the conditional for variable assignment and comparison.\u30a8\u30e9\u30fc\u306e\u5bfe\u51e6\u6cd5 - \u7d19\u4e00\u91cd\u306e\u7a4d\u307f\u91cd\u306d\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","width":"100%","blog_title":"\u7d19\u4e00\u91cd\u306e\u7a4d\u307f\u91cd\u306d"}