Class: Set
Instance Method Summary collapse
Instance Method Details
#delete(o) ⇒ Object
5 6 7 |
# File 'lib/volt/reactive/dependency.rb', line 5 def delete(o) @hash.delete(o) end |
#delete?(o) ⇒ Boolean
9 10 11 12 13 14 15 |
# File 'lib/volt/reactive/dependency.rb', line 9 def delete?(o) if include?(o) delete(o) else nil end end |
#delete_if ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/volt/reactive/dependency.rb', line 17 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
25 26 27 |
# File 'lib/volt/reactive/dependency.rb', line 25 def to_a @hash.keys end |