Sha256: d9f7518ee39413dc1606d9afae5b86c8c590dbd9ee9fa369bd0906732a1a4e8d

Contents?: true

Size: 581 Bytes

Versions: 20

Compression:

Stored size: 581 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module Packwerk
  module OutputStyles
    # See https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit for ANSI escape colour codes
    class Coloured
      extend T::Sig
      include OutputStyle

      sig { override.returns(String) }
      def reset
        "\033[m"
      end

      sig { override.returns(String) }
      def filename
        # 36 is foreground cyan
        "\033[36m"
      end

      sig { override.returns(String) }
      def error
        # 31 is foreground red
        "\033[31m"
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
packwerk-3.2.2 lib/packwerk/output_styles/coloured.rb
packwerk-3.2.1 lib/packwerk/output_styles/coloured.rb
packwerk-3.2.0 lib/packwerk/output_styles/coloured.rb
packwerk-3.1.0 lib/packwerk/output_styles/coloured.rb
packwerk-3.0.1 lib/packwerk/output_styles/coloured.rb
packwerk-3.0.0 lib/packwerk/output_styles/coloured.rb
packwerk-2.3.0 lib/packwerk/output_styles/coloured.rb
packwerk-2.2.2 lib/packwerk/output_styles/coloured.rb
packwerk-2.2.1 lib/packwerk/output_styles/coloured.rb
packwerk-2.2.0 lib/packwerk/output_styles/coloured.rb
packwerk-2.1.1 lib/packwerk/output_styles/coloured.rb
packwerk-2.1.0 lib/packwerk/output_styles/coloured.rb
packwerk-2.0.0 lib/packwerk/output_styles/coloured.rb
packwerk-1.4.0 lib/packwerk/output_styles/coloured.rb
packwerk-1.3.2 lib/packwerk/output_styles/coloured.rb
packwerk-1.3.1 lib/packwerk/output_styles/coloured.rb
packwerk-1.3.0 lib/packwerk/output_styles/coloured.rb
packwerk-1.2.0 lib/packwerk/output_styles/coloured.rb
packwerk-1.1.3 lib/packwerk/output_styles/coloured.rb
packwerk-1.1.2 lib/packwerk/output_styles/coloured.rb