class

Term::Reader::History

Inherits Enumerable < Reference < Object

Constants

DEFAULT_SIZE = 32 << 4

Default maximum size

EXCLUDE_NONE = ->(s : String) do false end

Default exclude proc

Constructors

new(max_size : Int32 = DEFAULT_SIZE, duplicates : Bool = true, cycle : Bool = false, exclude : String -> Bool = EXCLUDE_NONE)

Create a history buffer

Source

Instance methods

<<(line : String) : String
Source
[](index : Int) : String
Source
clear
Source
cycle
Source
cycle=(cycle : Bool)
Source
duplicates
Source
duplicates=(duplicates : Bool)
Source
each(*args, **options)
Source
each(*args, **options, &)
Source
exclude
Source
exclude=(exclude : String -> Bool)
Source
index
Source
length(*args, **options)
Source
length(*args, **options, &)
Source
max_size

Set and retrive the maximum size of the buffer

Source
max_size=(max_size : Int32)

Set and retrive the maximum size of the buffer

Source
next
Source
next?
Source
pred
Source
previous
Source
previous?
Source
push(line : String) : String
Source
size(*args, **options)
Source
size(*args, **options, &)
Source
succ
Source
to_s(*args, **options)
Source
to_s(*args, **options, &)
Source