lib/cli/mastermind.rb
# Processes command line arguements to build the starting plan stack.
#
# @see ArgParse
#
# @return [Void]
Processes command line arguements to build the starting plan stack.
Processes command line arguements to build the starting plan stack .
def process_plan_names
        @arguments.do_command_expansion!(configuration)
        @arguments.insert_base_plan!(@base_plan) unless @base_plan.nil?
        @plan_stack = []
        @selected_plan = plans if @arguments.has_additional_plan_names?
        while @arguments.has_additional_plan_names?
          plan_name = @arguments.get_next_plan_name
          @selected_plan = @selected_plan[plan_name]
          if @selected_plan.nil?
            puts "No plan found at #{(@plan_stack + [titleize(plan_name)]).join('/')}"
            puts @arguments.parser
            exit 1
          end
          @plan_stack << titleize(@selected_plan.name)
        end
      end
def process_plan_names @arguments . do_command_expansion! ( configuration ) @arguments . insert_base_plan! ( @base_plan ) unless @base_plan . nil? @plan_stack = [ ] @selected_plan = plans if @arguments . has_additional_plan_names? while @arguments . has_additional_plan_names? plan_name = @arguments . get_next_plan_name @selected_plan = @selected_plan [ plan_name ] if @selected_plan . nil? puts "No plan found at #{(@plan_stack + [titleize(plan_name)]).join('/')}" puts @arguments . parser exit 1 end @plan_stack << titleize ( @selected_plan . name ) end end
Processes command line arguements to build the starting plan stack.
Processes command line arguements to build the starting plan stack .
None
Void
see
None