Class: Presentify::Screen

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeScreen

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

#heightObject (readonly)

Returns the value of attribute height.



3
4
5
# File 'lib/presentify/screen.rb', line 3

def height
  @height
end

#widthObject (readonly)

Returns the value of attribute width.



3
4
5
# File 'lib/presentify/screen.rb', line 3

def width
  @width
end

Instance Method Details

#clearObject



9
10
11
# File 'lib/presentify/screen.rb', line 9

def clear
  system "clear"
end