Class: Punt::Receiver::Config
- Inherits:
-
Object
- Object
- Punt::Receiver::Config
- Defined in:
- lib/punt/receiver/config.rb
Instance Method Summary collapse
- #github_token ⇒ Object
-
#initialize(env = ENV, yaml = YAML) ⇒ Config
constructor
A new instance of Config.
- #relevant_repos ⇒ Object
Constructor Details
#initialize(env = ENV, yaml = YAML) ⇒ Config
Returns a new instance of Config.
6 7 8 9 |
# File 'lib/punt/receiver/config.rb', line 6 def initialize(env=ENV,yaml=YAML) @env = env @yaml = yaml end |
Instance Method Details
#github_token ⇒ Object
11 12 13 |
# File 'lib/punt/receiver/config.rb', line 11 def github_token @env.fetch("GITHUB_TOKEN") end |
#relevant_repos ⇒ Object
15 16 17 18 |
# File 'lib/punt/receiver/config.rb', line 15 def relevant_repos file_name = @env.fetch("PR_REPOS_FILE") @yaml.load_file(file_name)["repos"] end |