Class: GhBbAudit::Github::GithubUser

Inherits:
Object
  • Object
show all
Includes:
SemanticLogger::Loggable
Defined in:
lib/gh_bb_audit/github/github_user.rb

Instance Method Summary collapse

Constructor Details

#initialize(user_name) ⇒ GithubUser

Returns a new instance of GithubUser.



8
9
10
# File 'lib/gh_bb_audit/github/github_user.rb', line 8

def initialize(user_name)
 @user_name = user_name
end

Instance Method Details

#public_reposObject



12
13
14
15
16
17
18
19
# File 'lib/gh_bb_audit/github/github_user.rb', line 12

def public_repos
  @public_repos ||= begin 
    (GithubApi.get_api_accesor.repos.list user: @user_name).collect(&:name)
      rescue StandardError => e
logger.error "GITHUB:: Error in fetching repos for User:: #{@user_name} ", error: e.inspect
[]
      end
end