Class: Incept::MultipleOptionPackage
- Inherits:
-
Object
- Object
- Incept::MultipleOptionPackage
show all
- Includes:
- Package
- Defined in:
- lib/incept/multiple_option_package.rb
Instance Method Summary
collapse
Methods included from Package
#command_options, included, #initialize, #render, #template, #template_path
Instance Method Details
#environment_variable_name ⇒ Object
16
17
18
|
# File 'lib/incept/multiple_option_package.rb', line 16
def environment_variable_name
"PROLOGUE_#{@type.upcase}"
end
|
#environment_variable_value ⇒ Object
20
21
22
|
# File 'lib/incept/multiple_option_package.rb', line 20
def environment_variable_value
selected_package_name.downcase
end
|
#prompt ⇒ Object
5
6
7
8
9
|
# File 'lib/incept/multiple_option_package.rb', line 5
def prompt
" Which #{@type} package would you like to use?\n" +
option_display + "\n" +
" Enter a choice (0-#{max_option}): "
end
|
#selected? ⇒ Boolean
24
25
26
|
# File 'lib/incept/multiple_option_package.rb', line 24
def selected?
!selection.nil? && selection != 0
end
|
#selection=(selection) ⇒ Object
11
12
13
14
|
# File 'lib/incept/multiple_option_package.rb', line 11
def selection=(selection)
selection = selection.to_i
@selection = within_bounds?(selection) ? selection : 0
end
|