Class: Presentify::Screen
- Inherits:
-
Object
- Object
- Presentify::Screen
- Defined in:
- lib/presentify/screen.rb
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
- #clear ⇒ Object
-
#initialize ⇒ Screen
constructor
A new instance of Screen.
Constructor Details
#initialize ⇒ Screen
Returns a new instance of Screen.
5 6 7 |
# File 'lib/presentify/screen.rb', line 5 def initialize @height, @width = `stty -a`.scan(/(\d+) rows.+?(\d+) columns/)[0] end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
3 4 5 |
# File 'lib/presentify/screen.rb', line 3 def height @height end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
3 4 5 |
# File 'lib/presentify/screen.rb', line 3 def width @width end |
Instance Method Details
#clear ⇒ Object
9 10 11 |
# File 'lib/presentify/screen.rb', line 9 def clear system "clear" end |