Sha256: dd6201233d400fd6d8a3e551d2cbd38a97e99573ea2ba705ee8dc30644961816
Contents?: true
Size: 706 Bytes
Versions: 10
Compression:
Stored size: 706 Bytes
Contents
module Inch # The CLI module is tasked with the deconstruction of CLI calls # into API calls. # # @see Inch::API module CLI class << self # Returns the columns of the terminal window # (defaults to 80) # @param default [Fixnum] default value for columns # @return [Fixnum] def get_term_columns(default = 80) str = `stty size` rows_cols = str.split(' ').map(&:to_i) rows_cols[1] || default rescue default end end COLUMNS = get_term_columns end end require 'inch/cli/arguments' require 'inch/cli/sparkline_helper' require 'inch/cli/trace_helper' require 'inch/cli/yardopts_helper' require 'inch/cli/command'
Version data entries
10 entries across 10 versions & 1 rubygems