Class: Roo::Spreadsheet
- Inherits:
-
Object
- Object
- Roo::Spreadsheet
- Defined in:
- lib/roo.rb
Class Method Summary collapse
Class Method Details
.open(file) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/roo.rb', line 49 def open(file) case File.extname(file) when '.xls' Excel.new(file) when '.xlsx' Excelx.new(file) when '.ods' Openoffice.new(file) when '.csv' Csv.new(file) # when '' else Google.new(file) # else # raise ArgumentError, "Don't know how to open file #{file}" end end |