Class: Capistrano::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/capserverext/recipes.rb

Class Method Summary collapse

Class Method Details

.prompt(msg) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/capserverext/recipes.rb', line 6

def self.prompt(msg)
  sync = STDOUT.sync
  begin
    STDOUT.sync = true
    print(msg)
    STDIN.gets.chomp
  ensure
    STDOUT.sync = sync
    puts
  end
end