Class: ContributorsStats::UserData::Simple

Inherits:
Object
  • Object
show all
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

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(, data, contributions)
  {
    'avatar_url'    => data['avatar_url'],
    'name'          => ,
    'url'           => data['url'],
    'html_url'      => profile_url(),
    'contributions' => contributions
  }
end

.profile_url(username) ⇒ String

build github profile url for the given user name

Parameters:

  • username (String)

Returns:

  • (String)

    github profile url



19
20
21
# File 'lib/plugins/contributors_stats/user_data/simple.rb', line 19

def self.profile_url(username)
  "https://github.com/#{username}"
end