Class: Octopolo::GitHub::User
- Inherits:
-
Object
- Object
- Octopolo::GitHub::User
- Defined in:
- lib/octopolo/github/user.rb
Instance Attribute Summary collapse
-
#login ⇒ Object
Returns the value of attribute login.
Class Method Summary collapse
-
.user_data(login) ⇒ Object
Private: The raw GitHub API data for the given login.
Instance Method Summary collapse
-
#author_name ⇒ Object
Public: The real name of the author.
-
#initialize(login) ⇒ User
constructor
Public: Instantiate a new User.
-
#user_data ⇒ Object
Private: The raw GitHub API data for the user.
Constructor Details
#initialize(login) ⇒ User
Public: Instantiate a new User
login - The login (username) of the given user
11 12 13 |
# File 'lib/octopolo/github/user.rb', line 11 def initialize login self.login = login end |
Instance Attribute Details
#login ⇒ Object
Returns the value of attribute login.
6 7 8 |
# File 'lib/octopolo/github/user.rb', line 6 def login @login end |
Class Method Details
Instance Method Details
#author_name ⇒ Object
Public: The real name of the author
If the user has a name in GitHub, #author_name returns this. Otherwise returns the given login.
Returns a String containing the name
21 22 23 |
# File 'lib/octopolo/github/user.rb', line 21 def user_data.name || login end |