Module: Phase::Util::Console

Included in:
CLI::Command, IPA::EnterpriseDeployment, Shell
Defined in:
lib/phase/util/console.rb

Instance Method Summary collapse

Instance Method Details

#ask(str) ⇒ Object

Prompts user for input.



6
7
8
9
# File 'lib/phase/util/console.rb', line 6

def ask(str)
  print "[phase] ".blue.on_cyan + "#{str}".black.on_cyan + " "
  STDIN.gets.chomp
end

#fail(str) ⇒ Object

Prints a message and then exits.



17
18
19
# File 'lib/phase/util/console.rb', line 17

def fail(str)
  abort "[phase]".red + " #{ str }"
end

#log(str) ⇒ Object

Prints a message.



12
13
14
# File 'lib/phase/util/console.rb', line 12

def log(str)
  puts "[phase]".green + " #{ str }"
end