Module: Tins::Terminal
- Defined in:
- lib/tins/terminal.rb
Class Method Summary collapse
Class Method Details
.cols ⇒ Object
38 39 40 |
# File 'lib/tins/terminal.rb', line 38 def cols columns end |
.columns ⇒ Object
33 34 35 36 |
# File 'lib/tins/terminal.rb', line 33 def columns winsize[1] || `stty size 2>/dev/null`.split[1].to_i.nonzero? || `tput cols 2>/dev/null`.to_i.nonzero? || 80 end |
.lines ⇒ Object
29 30 31 |
# File 'lib/tins/terminal.rb', line 29 def lines rows end |
.rows ⇒ Object
24 25 26 27 |
# File 'lib/tins/terminal.rb', line 24 def rows winsize[0] || `stty size 2>/dev/null`.split[0].to_i.nonzero? || `tput lines 2>/dev/null`.to_i.nonzero? || 25 end |