Class: GitHub::User

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/github/models/user.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_json(json) ⇒ Object



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

def self.from_json(json)
  new(json)
end

.users_from_json(json) ⇒ Object



9
10
11
12
13
# File 'lib/github/models/user.rb', line 9

def self.users_from_json(json)
  json.inject([]) do |users, |
    users << from_json(:login => )
  end
end

Instance Method Details

#followersObject



19
20
21
# File 'lib/github/models/user.rb', line 19

def followers
  @followers ||= GitHub.followers(self.)
end

#followingObject



15
16
17
# File 'lib/github/models/user.rb', line 15

def following
  @following ||= GitHub.following(self.)
end

#repositoriesObject



23
24
25
# File 'lib/github/models/user.rb', line 23

def repositories
  @repositories ||= GitHub.repositories(self.)
end

#watchedObject



27
28
29
# File 'lib/github/models/user.rb', line 27

def watched
  @watched ||= GitHub.watched(self.)
end