Class: CliUtil
- Inherits:
-
Object
- Object
- CliUtil
- Defined in:
- lib/yadecli/util/cli_util.rb
Overview
cli util
Class Method Summary collapse
- .check_root ⇒ Object
-
.print_header(title, subtitles) ⇒ Object
print header and subtitle(s).
Class Method Details
.check_root ⇒ Object
18 19 20 |
# File 'lib/yadecli/util/cli_util.rb', line 18 def check_root Process.uid.zero? end |
.print_header(title, subtitles) ⇒ Object
print header and subtitle(s)
12 13 14 15 16 |
# File 'lib/yadecli/util/cli_util.rb', line 12 def print_header(title, subtitles) a = Artii::Base.new puts a.asciify(title).colorize(:color => :green, :mode => :bold) subtitles.each { |s| puts s.colorize(:green) } unless subtitles.nil? || subtitles.empty? end |