Class: PairingMatrix::LocalRepos
- Inherits:
-
Object
- Object
- PairingMatrix::LocalRepos
- Defined in:
- lib/pairing_matrix/config/local_repos.rb
Instance Attribute Summary collapse
-
#authors_regex ⇒ Object
readonly
Returns the value of attribute authors_regex.
-
#repositories ⇒ Object
readonly
Returns the value of attribute repositories.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
- #absent? ⇒ Boolean
-
#initialize(authors_regex, repos) ⇒ LocalRepos
constructor
A new instance of LocalRepos.
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(, repos) @repositories = repos = end |
Instance Attribute Details
#authors_regex ⇒ Object (readonly)
Returns the value of attribute authors_regex.
3 4 5 |
# File 'lib/pairing_matrix/config/local_repos.rb', line 3 def end |
#repositories ⇒ Object (readonly)
Returns the value of attribute repositories.
3 4 5 |
# File 'lib/pairing_matrix/config/local_repos.rb', line 3 def repositories @repositories end |
#url ⇒ Object (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(, config) repos = config['repositories'] rescue [] LocalRepos.new(, repos) end |
Instance Method Details
#absent? ⇒ Boolean
15 16 17 |
# File 'lib/pairing_matrix/config/local_repos.rb', line 15 def absent? @repositories.empty? end |