Class: Orgrep::Repository

Inherits:
Object
  • Object
show all
Defined in:
lib/orgrep/repository.rb

Overview

call repositories from text file.

Class Method Summary collapse

Class Method Details

.repositoriesObject



6
7
8
9
10
11
12
# File 'lib/orgrep/repository.rb', line 6

def self.repositories
  if FileTest.exist?(Orgrep::SPECIFIED_REPOSITORY_TXT_PATH)
    return File.read(Orgrep::SPECIFIED_REPOSITORY_TXT_PATH).split("\n").uniq
  end

  @repositories ||= File.read(Orgrep::REPOSITORY_TXT_PATH).split("\n").uniq
end