def from_file(filename)
      if %w{ .yml .yaml }.include?(File.extname(filename))
        from_yaml(filename)
      elsif File.extname(filename) == ".json"
        from_json(filename)
      elsif File.extname(filename) == ".toml"
        from_toml(filename)
      else
        instance_eval(IO.read(filename), filename, 1)
      end
    end
def from_file(filename)
      if %w{ .yml .yaml }.include?(File.extname(filename))
        from_yaml(filename)
      elsif File.extname(filename) == ".json"
        from_json(filename)
      elsif File.extname(filename) == ".toml"
        from_toml(filename)
      else
        instance_eval(IO.read(filename), filename, 1)
      end
    end
Loads a given ruby file, and runs instance_eval against it in the context of the current
 object.

 Raises an IOError if the file cannot be found, or is not readable.

 === Parameters
 filename<String>:: A filename to read from