Class: ContributorsStats::UserData::Simple
- Inherits:
-
Object
- Object
- ContributorsStats::UserData::Simple
- Defined in:
- lib/plugins/contributors_stats/user_data/simple.rb
Overview
fill in user data using minimal possible set of data
Class Method Summary collapse
-
.load(login, data, contributions) ⇒ Object
fill in user data using minimal possible set of data.
-
.profile_url(username) ⇒ String
build github profile url for the given user name.
Class Method Details
.load(login, data, contributions) ⇒ Object
fill in user data using minimal possible set of data
7 8 9 10 11 12 13 14 15 |
# File 'lib/plugins/contributors_stats/user_data/simple.rb', line 7 def self.load(login, data, contributions) { 'avatar_url' => data['avatar_url'], 'name' => login, 'url' => data['url'], 'html_url' => profile_url(login), 'contributions' => contributions } end |
.profile_url(username) ⇒ String
build github profile url for the given user name
19 20 21 |
# File 'lib/plugins/contributors_stats/user_data/simple.rb', line 19 def self.profile_url(username) "https://github.com/#{username}" end |