Sha256: b7bc2ad024d94fe1e46e7fda08d9eaa07c6e493eda1accc301067518a70ab0cb

Contents?: true

Size: 638 Bytes

Versions: 7

Compression:

Stored size: 638 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)
      # @return [Fixnum]
      def get_term_columns
        str = `stty size`
        rows_cols = str.split(' ').map(&:to_i)
        rows_cols[1]
      rescue
        80
      end
    end
    COLUMNS = get_term_columns
  end
end

require_relative 'cli/arguments'
require_relative 'cli/sparkline_helper'
require_relative 'cli/trace_helper'
require_relative 'cli/yardopts_helper'

require_relative 'cli/command'

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
inch-0.4.2 lib/inch/cli.rb
inch-0.4.1 lib/inch/cli.rb
inch-0.4.0 lib/inch/cli.rb
inch-0.4.0.rc3 lib/inch/cli.rb
inch-0.4.0.rc2 lib/inch/cli.rb
inch-0.4.0.rc1 lib/inch/cli.rb
inch-0.3.4.rc1 lib/inch/cli.rb