def method_missing(sym, args=nil, &block)
      
      # When no block given, simply add the symbol and arg as key - value for a JsonPair to current
      return __store( sym, args ) unless block

      # In a block; create a JSON pair (with no value) and add it to the current object
      pair = Generate.pair_value(sym)
      __store pair

      # Now process the block
      @level += 1

      if args.nil?
        block.call
      else
        array!(args, &block)
      end

      # Set the value on the pair to the object at the top of the stack
      pair.value = @stack[@level]

      # Pop current off the top of the stack; we are done with it at this point
      @stack.pop

      @level -= 1
    end
def method_missing(sym, args=nil, &block)
      
      # When no block given, simply add the symbol and arg as key - value for a JsonPair to current
      return __store( sym, args ) unless block

      # In a block; create a JSON pair (with no value) and add it to the current object
      pair = Generate.pair_value(sym)
      __store pair

      # Now process the block
      @level += 1

      if args.nil?
        block.call
      else
        array!(args, &block)
      end

      # Set the value on the pair to the object at the top of the stack
      pair.value = @stack[@level]

      # Pop current off the top of the stack; we are done with it at this point
      @stack.pop

      @level -= 1
    end
Adds a new JsonPair to the builder where the key of the pair is set to the method name
 (`sym`).
 When passed a block, the value of the pair is set to the result of that
 block; otherwise, the value is set to the argument(s) (`args`).

 @example Create an object literal
     json.person do
       json.first_name @person.given_name
       json.last_name @person.surname
     end

 @example compiles to something like ...
     "person": {
       "first_name": "George",
       "last_name": "Burdell"
     }

 If a block is given and an argument is passed, the argument it is assumed to be an
 Array (more specifically, an object that responds to `each`).
 The argument is iterated over and each item is yielded to the block.
 The result of the block becomes an array item of the JsonArray.

 @example Map an of array of links to an array of JSON objects
     json.links(@links) do |link|
       json.rel link.first
       json.href link.last
     end

 @example compiles to something like ...
     "links": [
        {
          "rel": "self",
          "href": "http://example.com/people/123"
        },
        {
          "rel": "school",
          "href": "http://gatech.edu"
        }
     ]

 @param *args [Array] iterates over the given array yielding each array item to the block; the result of which is added to a JsonArray