lib/phase/util/console.rb in phase-0.0.16.1 vs lib/phase/util/console.rb in phase-0.0.17

- old
+ new

@@ -1,12 +1,20 @@ module Phase module Util module Console + # Prompts user for input. + def ask(str) + print "[phase] ".blue.on_cyan + "#{str}".black.on_cyan + " " + STDIN.gets.chomp + end + + # Prints a message. def log(str) puts "[phase]".green + " #{ str }" end + # Prints a message and then exits. def fail(str) puts abort "[phase]".red + " #{ str }" end