Class: PairingMatrix::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repos, authors_regex, github_access_token, github_repos, github_url) ⇒ Config

Returns a new instance of Config.



5
6
7
8
9
10
11
# File 'lib/pairing_matrix/config/config.rb', line 5

def initialize(repos, authors_regex, github_access_token, github_repos, github_url)
  @repos = repos
  @authors_regex = authors_regex
  @github_access_token = github_access_token
  @github_repos = github_repos
  @github_url = github_url
end

Instance Attribute Details

#authors_regexObject (readonly)

Returns the value of attribute authors_regex.



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

def authors_regex
  @authors_regex
end

#github_access_tokenObject (readonly)

Returns the value of attribute github_access_token.



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

def github_access_token
  @github_access_token
end

#github_reposObject (readonly)

Returns the value of attribute github_repos.



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

def github_repos
  @github_repos
end

#github_urlObject (readonly)

Returns the value of attribute github_url.



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

def github_url
  @github_url
end

#reposObject (readonly)

Returns the value of attribute repos.



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

def repos
  @repos
end

Instance Method Details

#fetch_from_github?Boolean

Returns:



13
14
15
# File 'lib/pairing_matrix/config/config.rb', line 13

def fetch_from_github?
  !@github_repos.nil? && !@github_repos.empty?
end

#github_enterprise?Boolean

Returns:



21
22
23
# File 'lib/pairing_matrix/config/config.rb', line 21

def github_enterprise?
  !@github_url.nil? && !@github_url.empty?
end

#has_github_access_token?Boolean

Returns:



17
18
19
# File 'lib/pairing_matrix/config/config.rb', line 17

def has_github_access_token?
  !@github_access_token.nil? && !@github_access_token.empty?
end