Module: Dev::UI::Terminal
- Defined in:
- lib/dev/ui/terminal.rb
Class Method Summary collapse
-
.width ⇒ Object
Returns the width of the terminal, if possible Otherwise will return 80.
Class Method Details
.width ⇒ Object
Returns the width of the terminal, if possible Otherwise will return 80
10 11 12 13 14 15 16 17 18 |
# File 'lib/dev/ui/terminal.rb', line 10 def self.width if console = IO.respond_to?(:console) && IO.console console.winsize[1] else 80 end rescue Errno::EIO 80 end |