public static function interpolate($card, array $nestedCards = array(), array $delimiter = array('{', '}'))
    {
        if (2 > $tokens = count($delimiter)) {
            throw new \LengthException('Number of delimiter tokens too short. Method requires exactly 2.');
        }

        // SlotMachine can still function with more than two delimiter tokens,
        // but will generate a warning.
        if ($tokens > 2) {
            trigger_error('Too many delimiter tokens given', E_USER_WARNING);
        }

        // build a replacement array with braces around the context keys
        $replace = array();
        foreach ($nestedCards as $slot => $nestedCard) {
          $replace[$delimiter[0] . $slot . $delimiter[1]] = $nestedCard;
        }

        // interpolate replacement values into the message and return
        return strtr($card, $replace);
    }