instance method Set#include?
include?(o) -> bool
member?(o) -> bool
-
オブジェクト o がその集合に属する場合に true を返します。
- [PARAM] o:
- オブジェクトを指定します。
set = Set['hello', 'world'] p set.include?('world') #=> true p set.include?('bye') #=> false
class Set
include?(o) -> bool
member?(o) -> bool
オブジェクト o がその集合に属する場合に true を返します。
set = Set['hello', 'world'] p set.include?('world') #=> true p set.include?('bye') #=> false