lib/kitchen/id_tracker.rb
# Returns a unique ID given the ID of an element that was copied and is about
# to be pasted
#
# @param original_id [String]
# @return [String]
#
Returns a unique ID given the ID of an element that was copied and is about
to be pasted
Returns a unique ID given the ID of an element that was copied and is about to be pasted
def modified_id_to_paste(original_id)
      return nil if original_id.nil?
      return '' if original_id.blank?
      count = @id_data[original_id][:count]
      if count.zero?
        original_id
      else
        "#{original_id}#{@id_copy_suffix}#{count}"
      end
    end
def modified_id_to_paste ( original_id ) return nil if original_id . nil? return '' if original_id . blank? count = @id_data [ original_id ] [ :count ] if count . zero? original_id else "#{original_id}#{@id_copy_suffix}#{count}" end end
Returns a unique ID given the ID of an element that was copied and is about
to be pasted
Returns a unique ID given the ID of an element that was copied and is about to be pasted
# A count of 0 means the element was cut and this is the first paste, do not # modify the ID; otherwise, use the uniquified ID.
None
String
original_id
<not_specific>
<not_specific>
None