{"title":"\u914d\u5217\u304b\u3089\u8981\u7d20\u3092\u691c\u7d22\u3059\u308b","type":"rich","author_url":"https://blog.hatena.ne.jp/rubytips86/","author_name":"rubytips86","categories":[],"height":"190","blog_title":"Ruby Tips!","description":"\u914d\u5217\u306b\u3042\u308b\u8981\u7d20\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u3092\u5224\u5b9a\u3059\u308b\u306b\u306fArray#include?\u3092\u4f7f\u3046\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u5f15\u6570\u3067\u4e0e\u3048\u305f\u8981\u7d20\u3068==\u3067\u7b49\u3057\u3044\u8981\u7d20\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306btrue\u3092\u8fd4\u3057\u3001\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306ffalse\u3092\u8fd4\u3059\u3002 p [1, 2, 3].include?(2) #=> true p [1, 2, 3].include?(4) #=> false \u4f55\u51e6\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u3082\u8abf\u3079\u305f\u3044\u5834\u5408\u306fArray#index\u3092\u4f7f\u3046\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u5f15\u6570\u3067\u4e0e\u3048\u305f\u8981\u7d20\u3068==\u3067\u7b49\u3057\u3044\u8981\u7d20\u3092\u6700\u521d\u306b\u898b\u3064\u3051\u305f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8fd4\u3057\u3001\u8981\u7d20\u304c\u5b58\u5728\u3057\u306a\u3051\u308c\u3070nil\u3092\u8fd4\u3059\u3002 p [1, 2, 3].index(2) #=> 1 p [1, 2, 3].ind\u2026","url":"https://rubytips86.hatenablog.com/entry/2014/04/03/120427","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubytips86.hatenablog.com%2Fentry%2F2014%2F04%2F03%2F120427\" title=\"\u914d\u5217\u304b\u3089\u8981\u7d20\u3092\u691c\u7d22\u3059\u308b - Ruby Tips!\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2014-04-03 12:04:27","provider_name":"Hatena Blog","image_url":null,"provider_url":"https://hatena.blog","blog_url":"https://rubytips86.hatenablog.com/","width":"100%"}