Class: RubyTUI::ResizeEvent
Overview
A terminal resize event carrying the new size in cells.
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(width:, height:) ⇒ ResizeEvent
constructor
A new instance of ResizeEvent.
-
#to_s ⇒ String
(also: #inspect)
Human-readable form, e.g.
Constructor Details
#initialize(width:, height:) ⇒ ResizeEvent
Returns a new instance of ResizeEvent.
152 153 154 155 |
# File 'lib/rubytui/event.rb', line 152 def initialize(width:, height:) @width = width @height = height end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
148 149 150 |
# File 'lib/rubytui/event.rb', line 148 def height @height end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
148 149 150 |
# File 'lib/rubytui/event.rb', line 148 def width @width end |
Instance Method Details
#to_s ⇒ String Also known as: inspect
Returns human-readable form, e.g. ResizeEvent(80x24).
158 |
# File 'lib/rubytui/event.rb', line 158 def to_s = "ResizeEvent(#{@width}x#{@height})" |