Module: Inception::CliHelpers::Display

Included in:
Inception::Cli
Defined in:
lib/inception/cli_helpers/display.rb

Instance Method Summary collapse

Instance Method Details

#confirm(message) ⇒ Object


20
21
22
23
# File 'lib/inception/cli_helpers/display.rb', line 20

def confirm(message)
  say "Confirming: #{message}", green
  say "" # bonus golden whitespace
end

#error(message) ⇒ Object


15
16
17
18
# File 'lib/inception/cli_helpers/display.rb', line 15

def error(message)
  say message, :red
  exit 1
end

#header(title, options = {}) ⇒ Object

Display header for a new section of the bootstrapper


4
5
6
7
8
9
10
11
12
13
# File 'lib/inception/cli_helpers/display.rb', line 4

def header(title, options={})
  say "" # golden whitespace
  if skipping = options[:skipping]
    say "Skipping #{title}", [:yellow, :bold]
    say skipping
  else
    say title, [:green, :bold]
  end
  say "" # more golden whitespace
end