Sha256: 1fa4b8395dbcd90036dbc4c98812752e35bc0930e58e18ae9770b418efa53fa3

Contents?: true

Size: 312 Bytes

Versions: 5

Compression:

Stored size: 312 Bytes

Contents

# frozen_string_literal: true

module Massa
  class CLI
    class << self
      def colorize(color, string)
        puts "\n\e[#{code(color)}m#{string}\e[0m\n"
      end

      def code(color)
        { red: 31, green: 32, yellow: 33, blue: 34, pink: 35, light_blue: 36 }[color] || 0
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
massa-0.1.2 lib/massa/cli.rb
massa-0.1.1 lib/massa/cli.rb
massa-0.1.0 lib/massa/cli.rb
massa-0.0.9 lib/massa/cli.rb
massa-0.0.8 lib/massa/cli.rb