Sha256: 6666f4987f470ba7e815bd47efab8c1822da504e93b248d168a8e4231f668e73

Contents?: true

Size: 681 Bytes

Versions: 2

Compression:

Stored size: 681 Bytes

Contents

module PairingMatrix
  class Config
    attr_reader :repos, :authors_regex, :github_access_token, :github_repos, :github_url

    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

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

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pairing_matrix-2.3.1 lib/pairing_matrix/config/config.rb
pairing_matrix-2.3 lib/pairing_matrix/config/config.rb