Class: Foo

Inherits:
Object
  • Object
show all
Includes:
Persistent
Defined in:
lib/fsdb/persistent.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Persistent

#dump, load, #persistent_mutex, restore, #save

Instance Attribute Details

#dirObject

Returns the value of attribute dir.



78
79
80
# File 'lib/fsdb/persistent.rb', line 78

def dir
  @dir
end

#xObject

Returns the value of attribute x.



77
78
79
# File 'lib/fsdb/persistent.rb', line 77

def x
  @x
end

Instance Method Details

#persistent_fileObject



79
# File 'lib/fsdb/persistent.rb', line 79

def persistent_file; "/tmp/foo"; end

#restore(file) ⇒ Object



80
# File 'lib/fsdb/persistent.rb', line 80

def restore file; @dir = File.dirname(file); end