Sha256: cfaa3209e05f38ad8bca4136af6d908704d0b7cd8c8d12470ed421b7f6af9602
Contents?: true
Size: 658 Bytes
Versions: 6
Compression:
Stored size: 658 Bytes
Contents
# frozen_string_literal: true module Nocode module Steps module Dataset # Insert the entries to the at_index of the specified register. # If at_index is nil then they will appended to the end. class Insert < Step option :at_index, :entries, :register def perform registers[register_option] = array(registers[register_option]) registers[register_option].insert(at_index, *entries) end private def entries array(entries_option) end def at_index at_index_option.nil? ? -1 : at_index_option.to_i end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems