Method: Persist.pull
- Defined in:
- lib/persist/persist.rb
.pull ⇒ Object
Public: Initialize the PStore Object–deserializing the marshalled Hash stored in the ‘.db.pstore’ file (creating the file if it does’t exist)– and set thread_safe and ultra_safe to true.
Examples
Persist.pull
# => #<PStore:0x007f8c199c9698
@abort=false,
@filename=".db.pstore",
@lock=#<Mutex:0x007f8c199c9580>,
@rdonly=true,
@table={},
@thread_safe=true,
@ultra_safe=true>
Returns the entire persistent store Object.
29 30 31 32 33 34 |
# File 'lib/persist/persist.rb', line 29 def pull @db = PStore.new '.db.pstore', true @db.ultra_safe = true @db.transaction(true) {} @db end |