Class: Charming::Screen

Inherits:
Data
  • Object
show all
Defined in:
lib/charming/screen.rb

Overview

Screen represents the terminal viewport dimensions as a simple Data class. The ‘width` and `height` values flow from the backend through the runtime loop into every controller dispatch for layout calculations.

Instance Attribute Summary collapse

Instance Attribute Details

#heightObject (readonly)

Returns the value of attribute height

Returns:

  • (Object)

    the current value of height



7
8
9
# File 'lib/charming/screen.rb', line 7

def height
  @height
end

#widthObject (readonly)

Returns the value of attribute width

Returns:

  • (Object)

    the current value of width



7
8
9
# File 'lib/charming/screen.rb', line 7

def width
  @width
end