Geometry
The dimensions of a terminal-backed Console.
Returned by geometry().
Fields
rows
Height in character cells, or nil if unknown.
Returns: Int?
cols
Width in character cells, or nil if unknown.
Returns: Int?
rows and cols are independently nil: a console may know one dimension
without the other. The host console (term.console) always returns a
Geometry, never nil itself — see
Console.geometry().
Subclassing
Geometry is the interface; reading rows or cols on a bare instance throws
UnsupportedError. A Do console that implements
geometry() subclasses this to describe itself: