Class: Set
Instance Method Summary collapse
-
#to_proc ⇒ Proc
Convert Set into a Proc that takes a value and returns true if the value is an element of the set or false otherwise.
Instance Method Details
#to_proc ⇒ Proc
Convert Set into a Proc that takes a value and returns true if the value is an element of the set or false otherwise.
7 8 9 10 11 |
# File 'lib/data/functions/set.rb', line 7 def to_proc lambda do |v, *_| self.include?(v) end end |