# File lib/aws/s3/acl_options.rb, line 169
      def format_grantee grantee
        case grantee
        when String then grantee
        when Hash

          if grantee.keys.count != 1
            msg = "grantee hashes must have exactly 1 key"
            raise ArgumentError, msg
          end

          # A granee hash looks like:
          #
          #     { :id => 'abc...fec' }
          #     { :uri => 'http://abc.com/foo' }
          #     { :email_address => 'xyz@amazon.com }
          #
          # It needs to look like
          #
          #     'id="abc...fec"'
          #     'uri="http://abc.com/foo"'
          #     'emailAddress="xyz@amazon.com"'
          type, token = grantee.to_a.flatten
          type = type.to_s.split('_').map{|part| ucfirst(part) }.join
          "#{type[0,1].downcase}#{type[1..-1]}=\"#{token}\""
        else
          raise ArgumentError, "grantees must be a string or a hash"
        end
      end