include?(o) -> bool[permalink][rdoc]member?(o) -> bool-
オブジェクト o がその集合に属する場合に true を返します。
- [PARAM] o:
- オブジェクトを指定します。
set = Set['hello', 'world'] p set.include?('world') #=> true p set.include?('bye') #=> false
このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ
include?(o) -> bool[permalink][rdoc]member?(o) -> boolオブジェクト o がその集合に属する場合に true を返します。
set = Set['hello', 'world']
p set.include?('world') #=> true
p set.include?('bye') #=> false