lib/tty/reader/history.rb
def push(line)
        @history.delete(line) unless @duplicates
        return if line.to_s.empty? || @exclude[line]

        @history.shift if size >= max_size
        @history << line
        @index = @history.size - 1

        self
      end
# Add the last typed line to history buffer
#
# @param [String] line
#
# @api public
Add the last typed line to history buffer
Add the last typed line to history buffer
def push(line)
        @history.delete(line) unless @duplicates
        return if line.to_s.empty? || @exclude[line]
        @history.shift if size >= max_size
        @history << line
        @index = @history.size - 1
        self
      end
def push ( line ) @history . delete ( line ) unless @duplicates return if line . to_s . empty? || @exclude [ line ] @history . shift if size >= max_size @history << line @index = @history . size - 1 self end
Add the last typed line to history buffer
Add the last typed line to history buffer
line
None
api
None