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