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/excelx/extractor.rb | |
Import Upstream version 2.7.1upstream/2.7.1
Diffstat (limited to 'lib/roo/excelx/extractor.rb')
| -rw-r--r-- | lib/roo/excelx/extractor.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/roo/excelx/extractor.rb b/lib/roo/excelx/extractor.rb new file mode 100644 index 0000000..1cdd13b --- /dev/null +++ b/lib/roo/excelx/extractor.rb @@ -0,0 +1,21 @@ +module Roo + class Excelx + class Extractor + def initialize(path) + @path = path + end + + private + + def doc + raise FileNotFound, "#{@path} file not found" unless doc_exists? + + ::Roo::Utils.load_xml(@path).remove_namespaces! + end + + def doc_exists? + @path && File.exist?(@path) + end + end + end +end |
