class Term::Reader::History
- Term::Reader::History
- Reference
- Object
Included Modules
- Enumerable(String)
Defined in:
reader/history.crConstant Summary
-
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
- .new(**options, & : self -> )
Instance Method Summary
- #<<(line : String) : String
- #[](index : Int) : String
- #clear : Nil
- #cycle : Bool
- #cycle=(cycle : Bool)
- #duplicates : Bool
- #duplicates=(duplicates : Bool)
- #each(*args, **options)
- #each(*args, **options, &)
- #exclude : String -> Bool
- #exclude=(exclude : String -> Bool)
- #get : String | Nil
- #index : Int32
- #length(*args, **options)
- #length(*args, **options, &)
-
#max_size : Int32
Set and retrive the maximum size of the buffer
-
#max_size=(max_size : Int32)
Set and retrive the maximum size of the buffer
- #next : Nil
- #next? : Bool
- #pred : Nil
- #previous : Nil
- #previous? : Bool
- #push(line : String) : String
- #size(*args, **options)
- #size(*args, **options, &)
- #succ : Nil
- #to_s(*args, **options)
- #to_s(*args, **options, &)
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