@overload find_field(index) @param index [Integer] The index of the field to be found. @return [Arrow::Array, nil] The `index`-th field or `nil` for out of range. @overload find_field(name) @param index [String, Symbol] The name of the field to be found. @return [Arrow::Array, nil] The field that has `name` or `nil` for nonexistent name.
(index_or_name)
| 41 | # @return [Arrow::Array, nil] |
| 42 | # The field that has `name` or `nil` for nonexistent name. |
| 43 | def find_field(index_or_name) |
| 44 | case index_or_name |
| 45 | when String, Symbol |
| 46 | name = index_or_name |
| 47 | (@name_to_field ||= build_name_to_field)[name.to_s] |
| 48 | else |
| 49 | index = index_or_name |
| 50 | fields[index] |
| 51 | end |
| 52 | end |
| 53 | |
| 54 | alias_method :fields_raw, :fields |
| 55 | def fields |
no test coverage detected