Class: Socialoud::Services::Github
- Inherits:
-
Base
- Object
- Base
- Socialoud::Services::Github
show all
- Defined in:
- lib/socialoud/services/github.rb
Instance Attribute Summary collapse
Attributes inherited from Base
#aggregator, #data
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #set, #setup!
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
22
23
24
25
26
27
28
29
|
# File 'lib/socialoud/services/github.rb', line 22
def method_missing(method, *args)
fetch_user!
if args.length > 0
@user.send(method, *args)
else
@user.send(method)
end
end
|
Instance Attribute Details
#user ⇒ Object
Returns the value of attribute user.
6
7
8
|
# File 'lib/socialoud/services/github.rb', line 6
def user
@user
end
|
Instance Method Details
#followers ⇒ Object
13
14
15
16
|
# File 'lib/socialoud/services/github.rb', line 13
def followers
fetch_user!
@user.users.followers.all
end
|
#profile_url ⇒ Object
18
19
20
|
# File 'lib/socialoud/services/github.rb', line 18
def profile_url
"http://github.com/#{@data['user'] || @data}"
end
|
#repositories ⇒ Object
8
9
10
11
|
# File 'lib/socialoud/services/github.rb', line 8
def repositories
fetch_user!
@user.repos.all
end
|