Module: Charty::TableAdapters
- Defined in:
- lib/charty/table_adapters.rb,
lib/charty/table_adapters/base_adapter.rb,
lib/charty/table_adapters/daru_adapter.rb,
lib/charty/table_adapters/hash_adapter.rb,
lib/charty/table_adapters/arrow_adapter.rb,
lib/charty/table_adapters/narray_adapter.rb,
lib/charty/table_adapters/pandas_adapter.rb,
lib/charty/table_adapters/nmatrix_adapter.rb,
lib/charty/table_adapters/datasets_adapter.rb,
lib/charty/table_adapters/active_record_adapter.rb
Defined Under Namespace
Classes: ActiveRecordAdapter, ArrowAdapter, BaseAdapter, DaruAdapter, DatasetsAdapter, HashAdapter, NArrayAdapter, NMatrixAdapter, PandasDataFrameAdapter
Class Method Summary
collapse
Class Method Details
.find_adapter_class(data) ⇒ Object
9
10
11
12
13
14
|
# File 'lib/charty/table_adapters.rb', line 9
def self.find_adapter_class(data)
@adapters.each_value do |adapter_class|
return adapter_class if adapter_class.supported?(data)
end
raise ArgumentError, "Unsupported data class: #{data.class}"
end
|
.register(name, adapter_class) ⇒ Object
5
6
7
|
# File 'lib/charty/table_adapters.rb', line 5
def self.register(name, adapter_class)
@adapters[name] = adapter_class
end
|