Class: LinuxHub::GithubUser
- Inherits:
-
Object
- Object
- LinuxHub::GithubUser
- Defined in:
- lib/linux-hub/github_user.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#ssh_keys ⇒ Object
readonly
Returns the value of attribute ssh_keys.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
- #authorized_keys ⇒ Object
-
#initialize(username) ⇒ GithubUser
constructor
A new instance of GithubUser.
Constructor Details
#initialize(username) ⇒ GithubUser
Returns a new instance of GithubUser.
5 6 7 8 |
# File 'lib/linux-hub/github_user.rb', line 5 def initialize(username) @username = username fetch_user_details end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
3 4 5 |
# File 'lib/linux-hub/github_user.rb', line 3 def email @email end |
#ssh_keys ⇒ Object (readonly)
Returns the value of attribute ssh_keys.
3 4 5 |
# File 'lib/linux-hub/github_user.rb', line 3 def ssh_keys @ssh_keys end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
3 4 5 |
# File 'lib/linux-hub/github_user.rb', line 3 def username @username end |
Instance Method Details
#authorized_keys ⇒ Object
10 11 12 13 14 |
# File 'lib/linux-hub/github_user.rb', line 10 def ssh_keys.map do |key| "#{key} #{email}" end end |