Method: Pritch::Persistence#load
- Defined in:
- lib/pritch/persistence.rb
#load ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/pritch/persistence.rb', line 12 public def load raise NoDataException unless File.exists?('.pritch') file = File.open('.pritch', 'r') content = file.read.split("\n-\n") file.close File.delete('.pritch') content end |