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
671 672 673 674 675 |
# File 'lib/critbit.rb', line 671 def initialize(critbit, t_val = true, &block) @critbit = critbit @t_val = t_val super(&block) end |
Instance Method Details
#select(entry) ⇒ Object
681 682 683 684 685 |
# File 'lib/critbit.rb', line 681 def select(entry) @critbit.delete(entry.getKey()) if (@block.call(entry.getKey(), entry.getValue()) == @t_val) Decision::CONTINUE end |