Class: GitScf::EnvConfig
- Inherits:
-
Object
- Object
- GitScf::EnvConfig
- Defined in:
- lib/git_scf/env_config.rb
Instance Method Summary collapse
- #get(key) ⇒ Object
-
#initialize(repo) ⇒ EnvConfig
constructor
A new instance of EnvConfig.
- #repo ⇒ Object
Constructor Details
#initialize(repo) ⇒ EnvConfig
Returns a new instance of EnvConfig.
4 5 6 |
# File 'lib/git_scf/env_config.rb', line 4 def initialize(repo) @repo = repo end |
Instance Method Details
#get(key) ⇒ Object
8 9 10 |
# File 'lib/git_scf/env_config.rb', line 8 def get(key) ENV[key] || @repo.config["gitscf.#{git_key(key)}"] end |
#repo ⇒ Object
12 13 14 |
# File 'lib/git_scf/env_config.rb', line 12 def repo @repo end |