Class: GhBbAudit::GithubUser

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

Instance Method Summary collapse

Constructor Details

#initialize(user_name) ⇒ GithubUser

Returns a new instance of GithubUser.



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

def initialize(user_name)
 @user_name = user_name
end

Instance Method Details

#public_reposObject



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

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