Class: Gh::Trending::Developer

Inherits:
Object
  • Object
show all
Defined in:
lib/gh_trending/developer.rb

Overview

This class represents a trending developer in the github’s trending developers page.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(full_name: '', user_profile_url: '', hot_repository_url: '') ⇒ Developer

Returns a new instance of Developer.



8
9
10
11
12
13
14
15
16
# File 'lib/gh_trending/developer.rb', line 8

def initialize(
  full_name: '',
  user_profile_url: '',
  hot_repository_url: ''
)
  @full_name = full_name
  @user_profile_url = 
  @hot_repository_url = hot_repository_url
end

Instance Attribute Details

#full_nameObject (readonly)

Returns the value of attribute full_name.



6
7
8
# File 'lib/gh_trending/developer.rb', line 6

def full_name
  @full_name
end

#hot_repository_urlObject (readonly)

Returns the value of attribute hot_repository_url.



6
7
8
# File 'lib/gh_trending/developer.rb', line 6

def hot_repository_url
  @hot_repository_url
end

#user_profile_urlObject (readonly)

Returns the value of attribute user_profile_url.



6
7
8
# File 'lib/gh_trending/developer.rb', line 6

def 
  @user_profile_url
end

Instance Method Details

#to_hObject



18
19
20
21
22
23
24
# File 'lib/gh_trending/developer.rb', line 18

def to_h
  {
    full_name: full_name,
    user_profile_url: ,
    hot_repository_url: hot_repository_url
  }
end