Sha256: 6ca35603417c35a9471e153dcd6ae46aea7aa9cf8dcc6b7cd25cd66c94b9a043

Contents?: true

Size: 834 Bytes

Versions: 4

Compression:

Stored size: 834 Bytes

Contents

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'

  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
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
roo-2.0.1 lib/roo.rb
culturecode-roo-2.0.2 lib/roo.rb
roo-2.0.0 lib/roo.rb
roo-2.0.0beta1 lib/roo.rb