Class: Ferret::Store::RAMDirectory::RAMFile
- Inherits:
-
Object
- Object
- Ferret::Store::RAMDirectory::RAMFile
- 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
-
#buffers ⇒ Object
readonly
Returns the value of attribute buffers.
-
#length ⇒ Object
(also: #size)
Methods.
-
#mtime ⇒ Object
Returns the value of attribute mtime.
Instance Method Summary collapse
-
#initialize(name) ⇒ RAMFile
constructor
A new instance of RAMFile.
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
#buffers ⇒ Object (readonly)
Returns the value of attribute buffers.
229 230 231 |
# File 'lib/ferret/store/ram_store.rb', line 229 def buffers @buffers end |
#length ⇒ Object Also known as: size
Methods
232 233 234 |
# File 'lib/ferret/store/ram_store.rb', line 232 def length @length end |
#mtime ⇒ Object
Returns the value of attribute mtime.
230 231 232 |
# File 'lib/ferret/store/ram_store.rb', line 230 def mtime @mtime end |