Class: Arrow::DictionaryDataType
- Inherits:
-
Object
- Object
- Arrow::DictionaryDataType
- Defined in:
- lib/arrow/dictionary-data-type.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ DictionaryDataType
constructor
Creates a new DictionaryDataType.
Constructor Details
#initialize(index_data_type, value_data_type, ordered) ⇒ DictionaryDataType #initialize(description) ⇒ DictionaryDataType
Creates a new Arrow::DictionaryDataType.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/arrow/dictionary-data-type.rb', line 98 def initialize(*args) n_args = args.size case n_args when 1 description = args[0] index_data_type = description[:index_data_type] value_data_type = description[:value_data_type] ordered = description[:ordered] when 3 index_data_type, value_data_type, ordered = args else = "wrong number of arguments (given, #{n_args}, expected 1 or 3)" raise ArgumentError, end index_data_type = DataType.resolve(index_data_type) value_data_type = DataType.resolve(value_data_type) initialize_raw(index_data_type, value_data_type, ordered) end |