Class: PairingMatrix::LocalRepos

Inherits:
Object
  • Object
show all
Defined in:
lib/pairing_matrix/config/local_repos.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authors_regex, repos) ⇒ LocalRepos

Returns a new instance of LocalRepos.



5
6
7
8
# File 'lib/pairing_matrix/config/local_repos.rb', line 5

def initialize(authors_regex, repos)
    @repositories = repos
    @authors_regex = authors_regex
end

Instance Attribute Details

#authors_regexObject (readonly)

Returns the value of attribute authors_regex.



3
4
5
# File 'lib/pairing_matrix/config/local_repos.rb', line 3

def authors_regex
  @authors_regex
end

#repositoriesObject (readonly)

Returns the value of attribute repositories.



3
4
5
# File 'lib/pairing_matrix/config/local_repos.rb', line 3

def repositories
  @repositories
end

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/pairing_matrix/config/local_repos.rb', line 3

def url
  @url
end

Class Method Details

.create_from(authors_regex, config) ⇒ Object



10
11
12
13
# File 'lib/pairing_matrix/config/local_repos.rb', line 10

def self.create_from(authors_regex, config)
    repos = config['repositories'] rescue []
    LocalRepos.new(authors_regex, repos)
end

Instance Method Details

#absent?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/pairing_matrix/config/local_repos.rb', line 15

def absent?
    @repositories.empty?
end