Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pull out Roo::Excel, Excel2003XMl, and Google, to be provided in sepa…
…rate libraries, roo-xls and roo-google.
- Loading branch information
Showing
67 changed files
with
123 additions
and
89,805 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,28 @@ | ||
module Roo | ||
CLASS_FOR_EXTENSION = { | ||
'.ods' => 'Roo::OpenOffice', | ||
'.xlsx' => 'Roo::Excelx', | ||
'.csv' => 'Roo::CSV' | ||
} | ||
|
||
def self.const_missing(const_name) | ||
case const_name | ||
when :Excel | ||
raise "Excel support has been extracted to roo-xls due to its dependency on the GPL'd spreadsheet gem. Install roo-xls to use Roo::Excel." | ||
when :Excel2003XML | ||
raise "Excel SpreadsheetML support has been extracted to roo-xls. Install roo-xls to use Roo::Excel2003XML." | ||
when :Google | ||
raise "Google support has been extracted to roo-google. Install roo-google to use Roo::Google." | ||
else | ||
super | ||
end | ||
end | ||
|
||
autoload :Spreadsheet, 'roo/spreadsheet' | ||
autoload :Base, 'roo/base' | ||
|
||
autoload :OpenOffice, 'roo/open_office' | ||
autoload :LibreOffice, 'roo/libre_office' | ||
autoload :Excel, 'roo/excel' | ||
autoload :Excelx, 'roo/excelx' | ||
autoload :Excel2003XML, 'roo/excel2003xml' | ||
autoload :Google, 'roo/google' | ||
autoload :CSV, 'roo/csv' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.