Module: Arrow::FieldContainable
- Included in:
- Schema, StructDataType
- Defined in:
- lib/arrow/field-containable.rb
Instance Method Summary collapse
Instance Method Details
#find_field(name_or_index) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/arrow/field-containable.rb', line 20 def find_field(name_or_index) case name_or_index when String, Symbol name = name_or_index get_field_by_name(name) when Integer index = name_or_index get_field(index) else = "field name or index must be String, Symbol or Integer" << ": <#{name_or_index.inspect}>" raise ArgumentError, end end |