Module: Interactive
- Included in:
- NonEmptyOptions
- Defined in:
- lib/interactive/option.rb,
lib/interactive/options.rb,
lib/interactive/version.rb,
lib/interactive/question.rb,
lib/interactive/response.rb,
lib/interactive/options_shortcuts.rb
Defined Under Namespace
Classes: EmptyOptions, HashNumberedOption, NonEmptyOptions, OptionsShortcuts, Question, ResponseWithArgs, ResponseWithNoArgs, TabularOptions, WholeNumberOption, WordOption
Constant Summary
collapse
- VERSION =
"0.6.2"
Class Method Summary
collapse
Class Method Details
.Option(option) ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/interactive/option.rb', line 6
def Option(option)
if option.respond_to?(:to_hash)
@option = HashNumberedOption.new(option)
elsif option.to_s.match(/^\d+$/)
@option = WholeNumberOption.new(option)
else
@option = WordOption.new(option)
end
@option
end
|
.Options(options = [], columns = []) ⇒ Object
.Response(*args) ⇒ Object