lib/translate.rb
# Load options from config file if exists.
Load options from config file if exists.
Load options from config file if exists .
def config
		if has_config_file?
			section = YAML::load(File.open(config_file_path))["translate"]
			return section.nil? ? {} : section.keys.inject({}) { |h, k| 
				h[k.to_sym] = section[k] 
				h
			}
		end
		{}
	end
def config if has_config_file? section = YAML :: load ( File . open ( config_file_path ) ) [ "translate" ] return section . nil? ? { } : section . keys . inject ( { } ) { | h , k | h [ k . to_sym ] = section [ k ] h } end { } end
Load options from config file if exists.
Load options from config file if exists .