Class: Githubris::User

Inherits:
Base
  • Object
show all
Defined in:
lib/githubris/user.rb

Instance Method Summary collapse

Methods inherited from Base

#==, #initialize, #swap_attributes

Constructor Details

This class inherits a constructor from Githubris::Base

Instance Method Details

#gists(options = {}) ⇒ Object



5
6
7
# File 'lib/githubris/user.rb', line 5

def gists(options={})
  @api.get_user_gists(@attributes[:login])
end

#reloadObject



13
14
15
16
17
18
19
20
# File 'lib/githubris/user.rb', line 13

def reload
  swap_attributes @api.get_user @attributes[:login]
rescue Githubris::Error => error
  case error
  when Githubris::Error::NotFound
    raise
  end
end

#starred_gists(options = {}) ⇒ Object



9
10
11
# File 'lib/githubris/user.rb', line 9

def starred_gists(options={})
  @api.get_user_starred_gists(options)
end