Sha256: 2a14a4ce56a02fab949bd30781d332706afe40b1958b2a37e1e96b07625df6bc
Contents?: true
Size: 568 Bytes
Versions: 16
Compression:
Stored size: 568 Bytes
Contents
module Csv2hash module Adapter class Base class UnsupportedAdapter < StandardError ; end def self.create adapter_name, file_path_or_data load "csv2hash/adapters/#{adapter_name}_adapter.rb" class_eval("Csv2hash::Adapter::#{klass_adapter(adapter_name)}").new file_path_or_data end private def self.klass_adapter adapter_symbol case adapter_symbol when :memory then :MemoryAdapter when :csv then :CsvAdapter else raise UnsupportedAdapter.new end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems