Class Readline::History
In: lib/readline.rb
Parent: Object

The History class encapsulates a history of all commands entered by users at the prompt, providing an interface for inspection and retrieval of all commands.

Methods

<<   []   []=   delete_at   each   empty?   length   pop   push   rb_remove_history   shift   size   to_s  

Public Class methods

Synonym for Readline.add_history.

Returns the command that was entered at the specified index in the history buffer.

Raises an IndexError if the entry is nil.

Sets the command str at the given index in the history buffer.

You can only replace an existing entry. Attempting to create a new entry will result in an IndexError.

Deletes an entry from the histoyr buffer at the specified index.

Iterates over each entry in the history buffer.

Returns a bolean value indicating whether or not the history buffer is empty.

Returns the length of the history buffer.

Removes and returns the last element from the history buffer.

Pushes a list of args onto the history buffer.

Internal function that removes the item at index from the history buffer, performing necessary duplication in the process.

Removes and returns the first element from the history buffer.

Synonym for Readline.length.

The History class, stringified in all caps.

[Validate]