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, dictionary, ordered) ⇒ DictionaryDataType #initialize(description) ⇒ DictionaryDataType
Creates a new Arrow::DictionaryDataType.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/arrow/dictionary-data-type.rb', line 88 def initialize(*args) n_args = args.size case n_args when 1 description = args[0] index_data_type = description[:index_data_type] dictionary = description[:dictionary] ordered = description[:ordered] when 3 index_data_type, dictionary, 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) initialize_raw(index_data_type, dictionary, ordered) end |