Method: DataPaths::Finders#load_yaml_file

Defined in:
lib/data_paths/finders.rb

#load_yaml_file(path) ⇒ Object

Loads the YAML file at the given path, within any data directory.

Parameters:

  • path (String)

    The file path to search for.

Returns:

  • (Object)

    The contents of the YAML file.

Since:

  • 0.3.0



75
76
77
78
79
# File 'lib/data_paths/finders.rb', line 75

def load_yaml_file(path)
  if (file = find_data_file(path))
    YAML.load_file(file)
  end
end