lib/arrow/record.rb in red-arrow-0.2.1 vs lib/arrow/record.rb in red-arrow-0.2.2

- old
+ new

@@ -12,15 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. module Arrow class Record - def initialize(record_batch, i) + attr_accessor :index + def initialize(record_batch, index) @record_batch = record_batch - @i = i + @index = index end - def [](name_or_index) - @record_batch.find_column(name_or_index)[@i] + def [](column_name_or_column_index) + @record_batch.find_column(column_name_or_column_index)[@index] + end + + def columns + @record_batch.columns end end end