class Github::Gists

def list(*args)


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

List all public gists

github.gists.list
github = Github.new :oauth_token => '...'
= Examples

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

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

List a user's gists.
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