From 78ec406e4ed3edc01591fecd419784e7898c6eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sun, 13 May 2012 00:14:00 +0200 Subject: Spin: add #resume! --- lib/evendoors/spin.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/evendoors/spin.rb b/lib/evendoors/spin.rb index e4f61cf..da340d3 100644 --- a/lib/evendoors/spin.rb +++ b/lib/evendoors/spin.rb @@ -135,6 +135,10 @@ module EvenDoors File.open(path||@hibernate_path,'w') do |f| f << JSON.pretty_generate(self) end end # + def self.resume! path=nil + self.json_create JSON.load File.open(path||@hibernate_path,'r') { |f| f.read } + end + # end # end -- cgit v1.1-2-g2b99