lib/esv.rb in excel-esv-0.0.4 vs lib/esv.rb in excel-esv-0.0.5
- old
+ new
@@ -8,9 +8,15 @@
generator = Generator.new
yield(generator)
generator.render
end
+ def self.generate_file(path, &block)
+ File.open(path, "w") do |file|
+ file.write generate(&block)
+ end
+ end
+
def self.parse(data)
fake_file = StringIO.new(data)
book = Spreadsheet.open(fake_file)
# We could support multiple worksheets, but let's not until we actually need it.