Sha256: 20e7d1a59834914073eaeabc6231206264e2b2771bdbdb2284f4d5b061717365

Contents?: true

Size: 630 Bytes

Versions: 124

Compression:

Stored size: 630 Bytes

Contents

module CC
  module CLI
    module Output
      def success(message)
        terminal.say colorize(message, :green)
      end

      def say(message)
        terminal.say message
      end

      def warn(message)
        terminal.say colorize("WARNING: #{message}", :yellow)
      end

      def fatal(message)
        $stderr.puts colorize(message, :red)
        exit 1
      end

      def colorize(string, *args)
        rainbow.wrap(string).color(*args)
      end

      def rainbow
        @rainbow ||= Rainbow.new
      end

      def terminal
        @terminal ||= HighLine.new($stdin, $stdout)
      end
    end
  end
end

Version data entries

124 entries across 124 versions & 2 rubygems

Version Path
codeclimate-fede-0.85.38 lib/cc/cli/output.rb
codeclimate-fede-0.85.37 lib/cc/cli/output.rb
codeclimate-fede-0.85.36 lib/cc/cli/output.rb
codeclimate-fede-0.85.35 lib/cc/cli/output.rb
codeclimate-fede-0.85.33 lib/cc/cli/output.rb
codeclimate-fede-0.85.32 lib/cc/cli/output.rb
codeclimate-fede-0.85.31 lib/cc/cli/output.rb
codeclimate-fede-0.85.30 lib/cc/cli/output.rb
codeclimate-fede-0.85.21 lib/cc/cli/output.rb
codeclimate-fede-0.85.24 lib/cc/cli/output.rb
codeclimate-fede-0.85.23 lib/cc/cli/output.rb
codeclimate-0.85.23 lib/cc/cli/output.rb
codeclimate-0.85.22 lib/cc/cli/output.rb
codeclimate-0.85.21 lib/cc/cli/output.rb
codeclimate-0.85.19 lib/cc/cli/output.rb
codeclimate-0.85.18 lib/cc/cli/output.rb
codeclimate-0.85.17 lib/cc/cli/output.rb
codeclimate-0.85.15 lib/cc/cli/output.rb
codeclimate-0.85.14 lib/cc/cli/output.rb
codeclimate-0.85.13 lib/cc/cli/output.rb