Class: Critbit::ListCursor
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from Cursor
Instance Method Summary collapse
-
#initialize(type) ⇒ ListCursor
constructor
————————————————————————————.
-
#select(entry) ⇒ Object
————————————————————————————.
Constructor Details
#initialize(type) ⇒ ListCursor
702 703 704 705 706 707 708 709 710 711 |
# File 'lib/critbit.rb', line 702 def initialize(type) if (type != :key && type != :value) raise "Illegal type #{type}" end @type = type @list = Array.new end |
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
695 696 697 |
# File 'lib/critbit.rb', line 695 def list @list end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
696 697 698 |
# File 'lib/critbit.rb', line 696 def type @type end |
Instance Method Details
#select(entry) ⇒ Object
717 718 719 720 |
# File 'lib/critbit.rb', line 717 def select(entry) @list << ((@type == :key)? entry.getKey() : entry.getValue()) Decision::CONTINUE end |