module CommandFactory

Factory pattern to create the appropriate command.

Public Instance Methods

next_command(params) click to toggle source
# File lib/gdsh/command_factory.rb, line 29
def next_command(params)
  Commands.interpret(params[0])
end
parsed_inputs() click to toggle source
# File lib/gdsh/command_factory.rb, line 21
def parsed_inputs
  # gets user input, defaulting to empty and removing newline
  user_input = $stdin.gets || ''

  # if command has parameters, split it up
  user_input.chomp.split(/[\(,\),\,,\ ]/)
end