Class: Mongoose::Node

Inherits:
Object show all
Defined in:
lib/mongoose/skiplist.rb

Overview


Node Class


Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lvl, key, value) ⇒ Node

Returns a new instance of Node.



471
472
473
474
475
476
# File 'lib/mongoose/skiplist.rb', line 471

def initialize(lvl, key, value)
  @lvl = lvl
  @forward = []
  @key = key
  @value = value
end

Instance Attribute Details

#forwardObject

Returns the value of attribute forward.



468
469
470
# File 'lib/mongoose/skiplist.rb', line 468

def forward
  @forward
end

#keyObject (readonly)

Returns the value of attribute key.



469
470
471
# File 'lib/mongoose/skiplist.rb', line 469

def key
  @key
end

#lvlObject (readonly)

Returns the value of attribute lvl.



469
470
471
# File 'lib/mongoose/skiplist.rb', line 469

def lvl
  @lvl
end

#valueObject

Returns the value of attribute value.



468
469
470
# File 'lib/mongoose/skiplist.rb', line 468

def value
  @value
end

Instance Method Details

#inspectObject



478
479
480
# File 'lib/mongoose/skiplist.rb', line 478

def inspect
  self.class.to_s
end