lib/excelfile/sheet_names.rb in rubyfromexcel-0.0.4 vs lib/excelfile/sheet_names.rb in rubyfromexcel-0.0.5
- old
+ new
@@ -1,6 +1,17 @@
# FIXME: This is obviously bad programming. What if we multithread?!
module RubyFromExcel
class SheetNames < Hash
include Singleton
+
+ def marshal_dump
+ map { |a,b| [a,b] }
+ end
+
+ def marshal_load array
+ array.each do |sheet|
+ self[sheet.first] = sheet.last
+ end
+ end
+
end
end
\ No newline at end of file