Class: Shelr::Terminal

Inherits:
Object
  • Object
show all
Defined in:
lib/shelr/terminal.rb

Instance Method Summary collapse

Instance Method Details

#puts_lineObject



9
10
11
# File 'lib/shelr/terminal.rb', line 9

def puts_line
  STDOUT.puts "-=" * (size[:width] / 2)
end

#sizeObject



4
5
6
7
# File 'lib/shelr/terminal.rb', line 4

def size
  height, width = `stty size`.split(' ')
  { :height => height.to_i, :width => width.to_i }
end