class PairingMatrix::ConfigReader

Public Class Methods

new(config_file) click to toggle source
# File lib/pairing_matrix/config/config_reader.rb, line 8
def initialize(config_file)
  @config_file = config_file
end

Public Instance Methods

config() click to toggle source
# File lib/pairing_matrix/config/config_reader.rb, line 12
def config
  raw_config = YAML::load_file @config_file
  author_regex = raw_config['authors_regex']

  PairingMatrix::Config.new(
    PairingMatrix::LocalRepos.create_from(author_regex, raw_config['local']),
    PairingMatrix::RemoteRepos.create_from(author_regex, raw_config['gitlab']),
    PairingMatrix::RemoteRepos.create_from(author_regex, raw_config['github'])
   )
end