class Terminfo::Database

Defined in:

database.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(names : Array(String), booleans : Hash(Terminfo::Keys::Booleans, Bool), numbers : Hash(Terminfo::Keys::Numbers, Int16), strings : Hash(Terminfo::Keys::Strings, Slice(UInt8))) #

[View source]

Class Method Detail

def self.new_empty #

[View source]

Instance Method Detail

def booleans : Hash(Terminfo::Keys::Booleans, Bool) #

[View source]
def get!(key : Keys::Booleans) #

Gets the Bool value for the key key, raises an InvalidKeyError if not set.


[View source]
def get!(key : Keys::Numbers) #

Gets the Int16 value for the key key, raises an InvalidKeyError if not set.


[View source]
def get!(key : Keys::Strings) #

Gets the Slice(UInt8) value for the key key, raises an InvalidKeyError if not set.


[View source]
def get?(key : Keys::Booleans) #

Gets the Bool value for the key key, or nil if not set.


[View source]
def get?(key : Keys::Numbers) #

Gets the Int16 value for the key key, or nil if not set.


[View source]
def get?(key : Keys::Strings) #

Gets the Slice(UInt8) value for the key key, or nil if not set.


[View source]
def names : Array(String) #

[View source]
def numbers : Hash(Terminfo::Keys::Numbers, Int16) #

[View source]
def set(key : Keys::Booleans, value : Bool) #

Sets key key to value value, raises InvalidKeyError if key is invalid.


[View source]
def set(key : Keys::Numbers, value : Int16) #

Sets key key to value value, raises InvalidKeyError if key is invalid.


[View source]
def set(key : Keys::Strings, value : Slice(UInt8)) #

Sets key key to value value, raises InvalidKeyError if key is invalid.


[View source]
def strings : Hash(Terminfo::Keys::Strings, Slice(UInt8)) #

[View source]