{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsinsoku.hatenablog.com%2Fentry%2F2018%2F05%2F13%2F002711\" title=\"Hash#key? \u3092\u4e0a\u66f8\u304d\u3057\u3066\u3082\u30ad\u30fc\u30ef\u30fc\u30c9\u5f15\u6570\u306f\u4e0a\u66f8\u304d\u3067\u304d\u306a\u3044 - \u30a2\u30b8\u30e3\u30a4\u30ebSE\u306e\u6182\u9b31\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://sinsoku.hatenablog.com/entry/2018/05/13/002711","version":"1.0","blog_url":"https://sinsoku.hatenablog.com/","image_url":"https://images-fe.ssl-images-amazon.com/images/I/51UJvlz4sPL._SL160_.jpg","width":"100%","blog_title":"\u30a2\u30b8\u30e3\u30a4\u30ebSE\u306e\u6182\u9b31","categories":["ruby"],"provider_url":"https://hatena.blog","published":"2018-05-13 00:27:11","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/sinsoku/","type":"rich","author_name":"sinsoku","title":"Hash#key? \u3092\u4e0a\u66f8\u304d\u3057\u3066\u3082\u30ad\u30fc\u30ef\u30fc\u30c9\u5f15\u6570\u306f\u4e0a\u66f8\u304d\u3067\u304d\u306a\u3044","description":"Ruby \u306e\u3057\u304f\u307f\u306b\u9762\u767d\u3044\u30b3\u30fc\u30c9\u304c\u66f8\u304b\u308c\u3066\u3044\u307e\u3057\u305f\u3002 class Hash def key?(val) puts \"Looking for key #{val}\" false end end def add_two(a: 2, b: 3) a+b end puts add_two(a: 1, b: 1) # Looking for key a # Looking for key b # 5 \u30ad\u30fc\u30ef\u30fc\u30c9\u5f15\u6570\u306f\u5185\u90e8\u3067 Hash#key? \u3092\u4f7f\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u4e0a\u66f8\u304d\u3059\u308b\u3068\u6319\u52d5\u304c\u5909\u308f\u308b\u3068\u3044\u3046\u5185\u5bb9\u3002 \u9762\u767d\u305d\u3046\u306a\u306e\u3067\u3001\u5b9f\u969b\u306b\u8a66\u3057\u3066\u307f\u305f\u3002 Ruby 2.6.0-dev \u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u5199\u7d4c\u3057\u3066\u3001 2.6.0-\u2026","height":"190"}