Class: LinuxHub::GithubUser

Inherits:
Object
  • Object
show all
Defined in:
lib/linux-hub/github_user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#emailObject (readonly)

Returns the value of attribute email.



3
4
5
# File 'lib/linux-hub/github_user.rb', line 3

def email
  @email
end

#ssh_keysObject (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

#usernameObject (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_keysObject



10
11
12
13
14
# File 'lib/linux-hub/github_user.rb', line 10

def authorized_keys
  ssh_keys.map do |key|
    "#{key} #{email}"
  end
end