{"version":"1.0","published":"2019-04-21 17:19:58","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgouf.hatenablog.com%2Fentry%2F2019%2F04%2F21%2F171958\" title=\"Array#include? \u3068 Object#in? \u3092\u3064\u304b\u3046 - \u30d6\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","title":"Array#include? \u3068 Object#in? \u3092\u3064\u304b\u3046","height":"190","blog_url":"https://gouf.hatenablog.com/","provider_name":"Hatena Blog","width":"100%","url":"https://gouf.hatenablog.com/entry/2019/04/21/171958","type":"rich","author_url":"https://blog.hatena.ne.jp/innocent-zero/","categories":["Ruby","Ruby on Rails"],"author_name":"innocent-zero","description":"\u307e\u3068\u3081 include? \u3068 in? Links \u307e\u3068\u3081 \u300c\u3060\u308c\u304c\u3069\u3046\u3057\u305f\u306e\u304b\u300d\u300c\u3069\u3046\u3057\u305f\u306e\u306f\u3060\u308c\u304b\u300d\u307f\u305f\u3044\u306a\u6587\u306e\u4e3b\u5f93\u306e\u9806\u5e8f\u30fb\u9006\u8ee2\u306f\u4e9b\u7d30\u306a\u3082\u306e\u304b\u3082\u3057\u308c\u306a\u3044 \u305d\u308c\u3067\u3082\u3001\u30b3\u30fc\u30c9\u3082\u6587\u7ae0\u306e1\u3064\u3001\u8aad\u307f\u6613\u3057\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u304d\u305f\u3044 include? \u3068 in? \u305f\u3068\u3048\u3070\u3001\u666e\u6bb5\u3067\u3042\u308c\u3070\u6b21\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3068\u601d\u3046 # \u3068\u304f\u306b\u610f\u5473\u306e\u306a\u3044\u4f8b\u793a\u30b3\u30fc\u30c9 base_array = %i[a b c] target = :a base_array.include?(target) # => true \u307e\u305f\u3001 target \u304c\u914d\u5217\u3060\u3068\u304b\u8907\u6570\u3042\u308b\u5834\u5408\u306b\u306f\u3001select \u306a\u3069 Enumerable \u306a\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u306e\u3067\u3001\u3044\u307e\u2026","blog_title":"\u30d6\u30ed\u30b0","image_url":null}