Class: Cdb::HashTableEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/cdb/writer.rb

Overview

Value class for an entry in a hash table.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash, key, offset) ⇒ HashTableEntry

Returns a new instance of HashTableEntry.



135
136
137
138
139
# File 'lib/cdb/writer.rb', line 135

def initialize(hash, key, offset)
  @hash = hash
  @key = key
  @offset = offset
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash.



133
134
135
# File 'lib/cdb/writer.rb', line 133

def hash
  @hash
end

#keyObject (readonly)

Returns the value of attribute key.



133
134
135
# File 'lib/cdb/writer.rb', line 133

def key
  @key
end

#offsetObject (readonly)

Returns the value of attribute offset.



133
134
135
# File 'lib/cdb/writer.rb', line 133

def offset
  @offset
end