lib/automata/dfa.rb
def feed(input)
      head = @start.to_s
      input.each_char { |symbol| head = @transitions[head][symbol] }
      accept = is_accept_state? head
      resp = {
        input: input,
        accept: accept,
        head: head 
      }
      resp
    end
def feed(input)
      head = @start.to_s
      input.each_char { |symbol| head = @transitions[head][symbol] }
      accept = is_accept_state? head
      resp = {
        input: input,
        accept: accept,
        head: head 
      }
      resp
    end
Runs the input on the machine and returns a Hash describing
 the machine's final state after running.

 @param [String] input the string to use as input for the DFA
 @return [Hash] a hash describing the DFA state after running
   * :input [String] the original input string
   * :accept [Boolean] whether or not the DFA accepted the string
   * :head [String] the state which the head is currently on