Class Pry::History
In: lib/pry/history.rb
Parent: Object

The History class is responsible for maintaining the user‘s input history, both internally and within Readline.

Methods

Attributes

clearer  [RW] 
loader  [RW] 
original_lines  [R]  @return [Fixnum] Number of lines in history when Pry first loaded.
pusher  [RW] 
saver  [RW] 

Public Class methods

Public Instance methods

<<(line)

Alias for push

Clear this session‘s history. This won‘t affect the contents of the history file.

@return [Fixnum] The number of lines in history.

Load the input history using `History.loader`. @return [Integer] The number of lines loaded

Add a line to the input history, ignoring blank and duplicate lines. @param [String] line @return [String] The same line that was passed in

Assign the default methods for loading, saving, pushing, and clearing.

@return [Fixnum] The number of lines in history from just this session.

Return an Array containing all stored history. @return [Array<String>] An Array containing all lines of history loaded

  or entered by the user in the current session.

[Validate]