lib/cli/mastermind.rb
# Process incoming options and take an appropriate action.
# This is normally called by the mastermind executable.
#
# @param cli_args [Array<String>] the arguments to pass into {ArgParse}
# @return [Void]
Process incoming options and take an appropriate action.
This is normally called by the mastermind executable.
Process incoming options and take an appropriate action . This is normally called by the mastermind executable .
def execute(cli_args=ARGV)
        @arguments = ArgParse.new(cli_args)
        enable_ui if @arguments.display_ui?
        frame('Mastermind') do
          if @arguments.dump_config?
            do_print_configuration
            exit 0
          end
          if @arguments.display_plans?
            do_filtered_plan_display
            exit 0
          end
          process_plan_names
          do_interactive_plan_selection until executable_plan_selected?
          if user_is_sure?
            execute_plan!
          else
            puts 'aborted!'
          end
        end
      end
def execute ( cli_args = ARGV ) @arguments = ArgParse . new ( cli_args ) enable_ui if @arguments . display_ui? frame ( 'Mastermind' ) do if @arguments . dump_config? do_print_configuration exit 0 end if @arguments . display_plans? do_filtered_plan_display exit 0 end process_plan_names do_interactive_plan_selection until executable_plan_selected? if user_is_sure? execute_plan! else puts 'aborted!' end end end
Process incoming options and take an appropriate action.
Process incoming options and take an appropriate action .
None
Void
cli_args
the arguments to pass into {ArgParse}
the arguments to pass into { ArgParse }