Class: Gh::Trending::Developer
- Inherits:
-
Object
- Object
- Gh::Trending::Developer
- 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
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
-
#hot_repository_url ⇒ Object
readonly
Returns the value of attribute hot_repository_url.
-
#user_profile_url ⇒ Object
readonly
Returns the value of attribute user_profile_url.
Instance Method Summary collapse
-
#initialize(full_name: nil, user_profile_url: nil, hot_repository_url: nil) ⇒ Developer
constructor
A new instance of Developer.
- #to_h ⇒ Object
Constructor Details
#initialize(full_name: nil, user_profile_url: nil, hot_repository_url: nil) ⇒ 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: nil, user_profile_url: nil, hot_repository_url: nil ) @full_name = full_name || '' @user_profile_url = user_profile_url || '' @hot_repository_url = hot_repository_url || '' end |
Instance Attribute Details
#full_name ⇒ Object (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_url ⇒ Object (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_url ⇒ Object (readonly)
Returns the value of attribute user_profile_url.
6 7 8 |
# File 'lib/gh_trending/developer.rb', line 6 def user_profile_url @user_profile_url end |
Instance Method Details
#to_h ⇒ Object
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: user_profile_url, hot_repository_url: hot_repository_url } end |