Class: Arrow::MapDataType
- Inherits:
-
Object
- Object
- Arrow::MapDataType
- Defined in:
- lib/arrow/map-data-type.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ MapDataType
constructor
Creates a new MapDataType.
Constructor Details
#initialize(key, item) ⇒ MapDataType #initialize(description) ⇒ MapDataType
Creates a new Arrow::MapDataType.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/arrow/map-data-type.rb', line 71 def initialize(*args) n_args = args.size case n_args when 1 description = args[0] key = description[:key] item = description[:item] when 2 key, item = args else = "wrong number of arguments (given, #{n_args}, expected 1..2)" raise ArgumentError, end key = DataType.resolve(key) item = DataType.resolve(item) initialize_raw(key, item) end |