Class: Capistrano::Configuration::Question

Inherits:
Object
  • Object
show all
Defined in:
lib/capistrano/configuration/question.rb

Direct Known Subclasses

ValidatedVariables::ValidatedQuestion

Instance Method Summary collapse

Constructor Details

#initialize(key, default, options = {}) ⇒ Question

Returns a new instance of Question.



4
5
6
7
8
# File 'lib/capistrano/configuration/question.rb', line 4

def initialize(key, default, options={})
  @key = key
  @default = default
  @options = options
end

Instance Method Details

#callObject



10
11
12
13
# File 'lib/capistrano/configuration/question.rb', line 10

def call
  ask_question
  value_or_default
end