Top Level Namespace

Instance Method Summary collapse

Instance Method Details

#prompt_with_default(var, default, &block) ⇒ Object



1
2
3
4
5
6
# File 'lib/capigento.rb', line 1

def prompt_with_default(var, default, &block)
  set(var) do
    Capistrano::CLI.ui.ask("#{var} [#{default}] : ", &block)
  end
  set var, default if eval("#{var.to_s}.empty?")
end