Class: Ferret::Store::RAMDirectory::RAMFile

Inherits:
Object
  • Object
show all
Defined in:
lib/ferret/store/ram_store.rb,
ext/ram_directory.c

Overview

This class contains an array of byte arrays which act as buffers to store the data in.

Constant Summary collapse

BUFFER =
" " * BUFFER_SIZE

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ RAMFile

Returns a new instance of RAMFile.



236
237
238
239
240
# File 'lib/ferret/store/ram_store.rb', line 236

def initialize(name)
  @buffers = Array.new
  @mtime = Time.now
  @length = 0
end

Instance Attribute Details

#buffersObject (readonly)

Returns the value of attribute buffers.



229
230
231
# File 'lib/ferret/store/ram_store.rb', line 229

def buffers
  @buffers
end

#lengthObject Also known as: size

Methods



232
233
234
# File 'lib/ferret/store/ram_store.rb', line 232

def length
  @length
end

#mtimeObject

Returns the value of attribute mtime.



230
231
232
# File 'lib/ferret/store/ram_store.rb', line 230

def mtime
  @mtime
end