diff options
| author | 2017-06-12 03:37:11 -0400 | |
|---|---|---|
| committer | 2017-06-12 03:37:11 -0400 | |
| commit | 8280a21a23d44aa90177e2bc041d0b8dc8556f4b (patch) | |
| tree | dadef7ee085c0e990a5070bd41b6a5b98c97f4fd /lib/roo.rb | |
Import Upstream version 2.7.1upstream/2.7.1
Diffstat (limited to 'lib/roo.rb')
| -rw-r--r-- | lib/roo.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/roo.rb b/lib/roo.rb new file mode 100644 index 0000000..ec8eb42 --- /dev/null +++ b/lib/roo.rb @@ -0,0 +1,33 @@ +require 'roo/constants' +require 'roo/errors' +require 'roo/spreadsheet' +require 'roo/base' + +module Roo + autoload :OpenOffice, 'roo/open_office' + autoload :LibreOffice, 'roo/libre_office' + autoload :Excelx, 'roo/excelx' + autoload :CSV, 'roo/csv' + + TEMP_PREFIX = 'roo_'.freeze + + CLASS_FOR_EXTENSION = { + ods: Roo::OpenOffice, + xlsx: Roo::Excelx, + xlsm: Roo::Excelx, + csv: Roo::CSV + } + + def self.const_missing(const_name) + case const_name + when :Excel + raise ROO_EXCEL_NOTICE + when :Excel2003XML + raise ROO_EXCELML_NOTICE + when :Google + raise ROO_GOOGLE_NOTICE + else + super + end + end +end |
