Class: Critbit::DeleteCursor
Instance Attribute Summary
Attributes inherited from Cursor
Instance Method Summary collapse
-
#initialize(critbit, t_val = true, &block) ⇒ DeleteCursor
constructor
————————————————————————————.
-
#select(entry) ⇒ Object
————————————————————————————.
Constructor Details
#initialize(critbit, t_val = true, &block) ⇒ DeleteCursor
673 674 675 676 677 |
# File 'lib/critbit.rb', line 673 def initialize(critbit, t_val = true, &block) @critbit = critbit @t_val = t_val super(&block) end |
Instance Method Details
#select(entry) ⇒ Object
683 684 685 686 687 |
# File 'lib/critbit.rb', line 683 def select(entry) @critbit.delete(entry.getKey()) if (@block.call(entry.getKey(), entry.getValue()) == @t_val) Decision::CONTINUE end |