Class: Git::Config
- Inherits:
-
Object
- Object
- Git::Config
- Defined in:
- lib/git/config.rb
Overview
The global configuration for this gem
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
8 9 10 11 12 |
# File 'lib/git/config.rb', line 8 def initialize @binary_path = nil @git_ssh = nil @timeout = nil end |
Instance Attribute Details
#binary_path
14 15 16 |
# File 'lib/git/config.rb', line 14 def binary_path @binary_path || (ENV.fetch('GIT_PATH', nil) && File.join(ENV.fetch('GIT_PATH', nil), 'git')) || 'git' end |
#git_ssh
18 19 20 |
# File 'lib/git/config.rb', line 18 def git_ssh @git_ssh || ENV.fetch('GIT_SSH', nil) end |
#timeout
22 23 24 |
# File 'lib/git/config.rb', line 22 def timeout @timeout || (ENV.fetch('GIT_TIMEOUT', nil) && ENV['GIT_TIMEOUT'].to_i) end |