Sha256: 4f6b045a55568a7ea2353d857c42f3c3a75a127b9908a8db25c875784166f867

Contents?: true

Size: 372 Bytes

Versions: 7

Compression:

Stored size: 372 Bytes

Contents

require 'rainbow'

module Semmy
  module Shell
    extend self

    attr_accessor :silence

    def info(text)
      say(text, :green)
    end

    def error(text)
      say(text, :red)
    end

    def sub_process_output(text)
      say(text, :yellow)
    end

    private

    def say(text, color)
      puts(Rainbow(text).color(color)) unless silence
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
semmy-1.2.0 lib/semmy/shell.rb
semmy-1.1.0 lib/semmy/shell.rb
semmy-1.0.2 lib/semmy/shell.rb
semmy-1.0.1 lib/semmy/shell.rb
semmy-1.0.0 lib/semmy/shell.rb
semmy-0.4.0 lib/semmy/shell.rb
semmy-0.3.0 lib/semmy/shell.rb