ruby_light_map_creator.rb
# Parses the input from the console.
Parses the input from the console.
Parses the input from the console .
def parse_command(input)
    command_array = input.split(' ')
    if Constants::COMMANDS_ALIAS[:lightmap_command].include? command_array[0].to_s.downcase
      action_command = command_array[1].to_s.downcase
      case action_command
        when 'generate', 'g'
          command_array -= %W(#{command_array[0].to_s.downcase} #{action_command})
          am_generate(command_array)
        else
          puts 'Couldn\'t parse action command.'
      end
    else
      puts 'Found nothing. Refer to source for explanation and usage.'
    end
  end
def parse_command ( input ) command_array = input . split ( ' ' ) if Constants :: COMMANDS_ALIAS [ :lightmap_command ] . include? command_array [ 0 ] . to_s . downcase action_command = command_array [ 1 ] . to_s . downcase case action_command when 'generate' , 'g' command_array -= %W( #{ command_array [ 0 ] . to_s . downcase } #{ action_command } ) am_generate ( command_array ) else puts 'Couldn\'t parse action command.' end else puts 'Found nothing. Refer to source for explanation and usage.' end end
Parses the input from the console.
Parses the input from the console .
# Lightmap command verified. Can proceed. Now get the action command. # We're generating a lightmap. Pass the rest of the command array to the generation function. # Remove the first two elements so param processing is easier and faster.
input
<not_specific>