lib/roo.rb in roo-1.3.5 vs lib/roo.rb in roo-1.3.6
- old
+ new
@@ -1,5 +1,23 @@
module Roo
+ class Spreadsheet
+ class << self
+ def open(file)
+ case File.extname(file)
+ when '.xls'
+ Excel.new(file)
+ when '.xlsx'
+ Excelx.new(file)
+ when '.ods'
+ Openoffice.new(file)
+ when ''
+ Google.new(file)
+ else
+ raise ArgumentError, "Don't know how to open file #{filename}"
+ end
+ end
+ end
+ end
end
require 'roo/version'
# require 'roo/spreadsheetparser' TODO:
require 'roo/generic_spreadsheet'