class Term::Reader::History

Included Modules

Defined in:

reader/history.cr

Constant Summary

DEFAULT_SIZE = 32 << 4

Default maximum size

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

Default exclude proc

Constructors

Instance Method Summary

Constructor Detail

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

Create a history buffer


[View source]
def self.new(**options, & : self -> ) #

[View source]

Instance Method Detail

def <<(line : String) : String #

[View source]
def [](index : Int) : String #

[View source]
def clear : Nil #

[View source]
def cycle : Bool #

[View source]
def cycle=(cycle : Bool) #

[View source]
def duplicates : Bool #

[View source]
def duplicates=(duplicates : Bool) #

[View source]
def each(*args, **options) #

[View source]
def each(*args, **options, &) #

[View source]
def exclude : String -> Bool #

[View source]
def exclude=(exclude : String -> Bool) #

[View source]
def get : String | Nil #

[View source]
def index : Int32 #

[View source]
def length(*args, **options) #

[View source]
def length(*args, **options, &) #

[View source]
def max_size : Int32 #

Set and retrive the maximum size of the buffer


[View source]
def max_size=(max_size : Int32) #

Set and retrive the maximum size of the buffer


[View source]
def next : Nil #

[View source]
def next? : Bool #

[View source]
def pred : Nil #

[View source]
def previous : Nil #

[View source]
def previous? : Bool #

[View source]
def push(line : String) : String #

[View source]
def size(*args, **options) #

[View source]
def size(*args, **options, &) #

[View source]
def succ : Nil #

[View source]
def to_s(*args, **options) #

[View source]
def to_s(*args, **options, &) #

[View source]