Method: MGit::Configuration.set
- Defined in:
- lib/mgit/configuration.rb
.set(key, value) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/mgit/configuration.rb', line 41 def self.set(key, value) case key when 'threads', 'colors' set_boolean(key, value) when 'plugindir' unless File.directory?(value) fail ConfigurationError, 'Illegal value for key plugindir. Has to be a directory.' end self.plugindir = File.(value) else fail ConfigurationError, "Unknown key: #{key}." end end |