Class: Cyclid::Cli::Formatter::Terminal

Inherits:
Base
  • Object
show all
Defined in:
lib/cyclid/cli/formatter.rb

Overview

Output with XTerm compatible color

Class Method Summary collapse

Methods inherited from Base

puts

Class Method Details

.ask(question) ⇒ Object



59
60
61
# File 'lib/cyclid/cli/formatter.rb', line 59

def ask(question)
  print "#{question}: ".colorize(:red)
end

.colorize(title, *args) ⇒ Object



47
48
49
# File 'lib/cyclid/cli/formatter.rb', line 47

def colorize(title, *args)
  puts_with_color(:cyan, title, args)
end

.error(title, *args) ⇒ Object



55
56
57
# File 'lib/cyclid/cli/formatter.rb', line 55

def error(title, *args)
  puts_with_color(:red, title, args)
end

.warning(title, *args) ⇒ Object



51
52
53
# File 'lib/cyclid/cli/formatter.rb', line 51

def warning(title, *args)
  puts_with_color(:yellow, title, args)
end