Methods
Class Public methods
[](hash) Link
new(indexes, row = nil, size: indexes.size) Link
: (Hash[String, Integer] | ExtendedIndexes, ?Array?, ?size: Integer) -> void
Instance Public methods
[]=(column, value) Link
Columns that aren’t in the indexes are added after the last index. The indexes are replaced rather than modified, since they’re usually shared with other rows. : (String, untyped) -> untyped
# File activemodel/lib/active_model/indexed_row.rb, line 392 def []=(column, value) unless index = @indexes[column] index = [@row.size, IndexedRow.max_slot(@indexes) + 1].max @indexes = ExtendedIndexes.add(@indexes, column, index) end if index >= @row.size @row.concat(IndexedRow.unset_row(index - @row.size + 1)) end @row[index] = value end
freeze() Link
: () -> self