Class: Set
Instance Method Summary collapse
Instance Method Details
#delete(o) ⇒ Object
| 5 6 7 8 9 10 11 12 | # File 'lib/volt/utils/set_patch.rb', line 5 def delete(o) if include?(o) @hash.delete(o) true else nil end end | 
#delete_if ⇒ Object
| 14 15 16 17 18 19 20 | # File 'lib/volt/utils/set_patch.rb', line 14 def delete_if block_given? or return enum_for(__method__) # @hash.delete_if should be faster, but using it breaks the order # of enumeration in subclasses. select { |o| yield o }.each { |o| @hash.delete(o) } self end | 
#to_a ⇒ Object
| 22 23 24 | # File 'lib/volt/utils/set_patch.rb', line 22 def to_a @hash.keys end |