# File lib/visage-app/config/file.rb, line 15 def self.find(filename, opts={}) range = opts[:ignore_bundled] ? (0..-2) : (0..-1) potential_filenames = @@config_directories[range].map {|d| d.join(filename)} potential_filenames.find { |f| ::File.exists?(f) } end
# File lib/visage-app/config/file.rb, line 21 def self.load(filename, opts={}) if not path = self.find(filename, opts) if opts[:create] path = @@config_directories.first.join(filename) begin FileUtils.touch(path) rescue Errno::EACCES => e raise Errno::EACCES, "Couldn't write #{path}. Do you have CONFIG_PATH set?" end end end YAML::load_file(path) end
Generated with the Darkfish Rdoc Generator 2.