Class: GitScf::EnvConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/git_scf/env_config.rb

Instance Method Summary collapse

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

#repoObject



12
13
14
# File 'lib/git_scf/env_config.rb', line 12

def repo
  @repo
end