Module: StackMaster::Commands::TerminalHelper

Included in:
ListStacks, Outputs, Status
Defined in:
lib/stack_master/commands/terminal_helper.rb

Instance Method Summary collapse

Instance Method Details

#window_sizeObject



4
5
6
7
8
9
10
11
12
# File 'lib/stack_master/commands/terminal_helper.rb', line 4

def window_size
  size = ENV.fetch("COLUMNS") { `tput cols`.chomp }

  if size.nil? || size == ""
    80
  else
    size.to_i
  end
end