Sha256: a7ddfd0e81a58ef8aeb1bbe47ab6edafc24f9f2003786f06b66b9dc5397f753c

Contents?: true

Size: 596 Bytes

Versions: 7

Compression:

Stored size: 596 Bytes

Contents

require 'thor/shell/color'
module Preek
  class Output < Thor::Shell::Color
    def status(*args)
      say_status *args
    end

    def print_line
      say "\n\t#{'-'*60}\n\n"
    end

    def blue(*args)
      status *args, :blue
    end

    def green(*args)
      status *args, :green
    end

    def red(*args)
      status *args, :red
    end
  end

  class CompactOutput < Output
    def status(title, text, color = nil)
      title = title.to_s + ": " if title.is_a?(Symbol)
      say title, color, false
      say text
    end

    def print_line
      say "\n-\n\n"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
preek-1.4.3 lib/preek/output.rb
preek-1.4.2 lib/preek/output.rb
preek-1.4.1 lib/preek/output.rb
preek-1.4.0 lib/preek/output.rb
preek-1.3.2 lib/preek/output.rb
preek-1.3.1 lib/preek/output.rb
preek-1.2.1 lib/preek/output.rb