Module: GitRunner::Configuration
Constant Summary
collapse
- FILE_LOCATIONS =
%w(/etc/git-runner.yml ~/.git-runner.yml)
- DEFAULTS =
{
'git_executable' => '/usr/bin/env git',
'instruction_file' => 'config/deploy.rb',
'instruction_prefix' => '# GitRunner:',
'tmp_directory' => '/tmp/git-runner',
}
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/git-runner/configuration.rb', line 19
def method_missing(method, *args, &block)
method_s = method.to_s
if __attributes.keys.include?(method_s)
__attributes[method_s]
elsif method.to_s.end_with?('=')
__attributes[method_s[0..-2]] = args[0]
else
super
end
end
|
Instance Method Details
#__attributes ⇒ Object
15
16
17
|
# File 'lib/git-runner/configuration.rb', line 15
def __attributes
@attributes ||= __load_attributes
end
|