def list(*args)
      params = arguments(args).params

      response = if (user = params.delete('user'))
        get_request("/users/#{user}/gists", params)
      elsif args.map(&:to_s).include?('public')
        get_request("/gists/public", params)
      else
        get_request("/gists", params)
      end
      return response unless block_given?
      response.each { |el| yield el }
    end
def list(*args)
      params = arguments(args).params

      response = if (user = params.delete('user'))
        get_request("/users/#{user}/gists", params)
      elsif args.map(&:to_s).include?('public')
        get_request("/gists/public", params)
      else
        get_request("/gists", params)
      end
      return response unless block_given?
      response.each { |el| yield el }
    end
List a user's gists

 @see https://developer.github.com/v3/gists/#list-a-users-gists

 @example
  github = Github.new
  github.gists.list user: 'user-name'

 List the authenticated user’s gists or if called anonymously,
 this will returns all public gists

 @example
  github = Github.new oauth_token: '...'
  github.gists.list

 List all public gists

 @see https://developer.github.com/v3/gists/#list-all-public-gists

  github = Github.new
  github.gists.list :public

 @return [Hash]

 @api public