Module: RemoteTable::Ods
- Defined in:
- lib/remote_table/ods.rb
Overview
Parses ODS files using Roo’s Openoffice class.
Know to have issues on JRuby.
Instance Method Summary collapse
Instance Method Details
#roo_class ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/remote_table/ods.rb', line 10 def roo_class if ::RUBY_PLATFORM == 'java' ::Kernel.warn "[remote_table] Opening ODS files on JRuby is known to fail because of a flaw in the underlying Roo library" end [:Openoffice, :OpenOffice] if ::Roo.const_defined?(:OpenOffice) ::Roo::OpenOffice elsif ::Roo.const_defined?(:Openoffice) ::Roo::Openoffice else raise "Couldn't find roo's OpenOffice class, maybe you need a newer version?" end end |