Class: GhBbAudit::GithubRepo

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

Instance Method Summary collapse

Constructor Details

#initialize(user_name, repo_name) ⇒ GithubRepo

Returns a new instance of GithubRepo.



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

def initialize(user_name,repo_name)
  @user_name = user_name
  @repo_name = repo_name
end

Instance Method Details

#get_all_file_pathsObject



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/gh_bb_audit/github_repo.rb', line 11

def get_all_file_paths
  return [] if ( !@user_name || !@repo_name )
  @paths ||= begin
    get_tree.each.inject([]) do |result, file|
      result << file.path
      result
    end
  rescue Exception => e
    []
  end 
  @paths
end