Class: CapistranoMulticonfigParallel::InteractiveMenu
- Inherits:
-
Object
- Object
- CapistranoMulticonfigParallel::InteractiveMenu
- Includes:
- ApplicationHelper
- Defined in:
- lib/capistrano_multiconfig_parallel/classes/interactive_menu.rb
Overview
methods used for the interactive menu where are listed all aplications
Instance Attribute Summary collapse
-
#applications ⇒ Object
Returns the value of attribute applications.
-
#choices ⇒ Object
Returns the value of attribute choices.
-
#msg ⇒ Object
Returns the value of attribute msg.
Instance Method Summary collapse
- #fetch_menu ⇒ Object
-
#initialize(applications) ⇒ InteractiveMenu
constructor
A new instance of InteractiveMenu.
Methods included from ApplicationHelper
action_confirmed?, check_hash_set, check_numeric, fetch_parsed_string, fetch_remaining_arguments, find_loaded_gem, find_remaining_args, get_question_details, msg_for_stdin?, msg_for_task?, multi_fetch_argv, parse_task_string, percent_of, regex_last_match, setup_command_line_standard, strip_characters_from_string, value_is_array?, verify_array_of_strings, verify_empty_options, warn_array_without_strings, wrap_string
Methods included from CoreHelper
app_debug_enabled?, ask_confirm, ask_stdout_confirmation, check_terminal_tty, debug_websocket?, error_filtered?, execute_with_rescue, find_worker_log, force_confirmation, format_error, log_error, log_output_error, log_to_file, print_to_log_file, rescue_error, rescue_interrupt, setup_filename_logger, setup_logger_formatter, show_warning, terminal_actor, websocket_config, websocket_server_config
Methods included from InternalHelper
check_file, config_file, create_log_file, custom_commands, default_internal_config, default_internal_configuration_params, detect_root, enable_main_log_file, fail_capfile_not_found, fetch_default_internal_config, find_config_type, find_env_multi_cap_root, find_file_in_directory, internal_config_directory, internal_config_file, log_directory, main_log_file, multi_level_prop, pathname_is_root?, pwd_directory, pwd_parent_dir, root, setup_default_configuration_types, sliced_default_config, try_detect_capfile
Constructor Details
#initialize(applications) ⇒ InteractiveMenu
Returns a new instance of InteractiveMenu.
9 10 11 12 13 |
# File 'lib/capistrano_multiconfig_parallel/classes/interactive_menu.rb', line 9 def initialize(applications) @applications = applications @msg = ' ' @choices = {} end |
Instance Attribute Details
#applications ⇒ Object
Returns the value of attribute applications.
7 8 9 |
# File 'lib/capistrano_multiconfig_parallel/classes/interactive_menu.rb', line 7 def applications @applications end |
#choices ⇒ Object
Returns the value of attribute choices.
7 8 9 |
# File 'lib/capistrano_multiconfig_parallel/classes/interactive_menu.rb', line 7 def choices @choices end |
#msg ⇒ Object
Returns the value of attribute msg.
7 8 9 |
# File 'lib/capistrano_multiconfig_parallel/classes/interactive_menu.rb', line 7 def msg @msg end |
Instance Method Details
#fetch_menu ⇒ Object
15 16 17 18 19 20 |
# File 'lib/capistrano_multiconfig_parallel/classes/interactive_menu.rb', line 15 def result = print_selections print "#{@msg}\n" result.present? ? result.split(',') : [] end |