module Trusty::Utilities::Yaml::ClassMethods

Public Instance Methods

load_content(content, &block) click to toggle source
# File lib/trusty/utilities/yaml.rb, line 15
def load_content(content, &block)
  YamlContext.render(content, &block)
end
load_file(filename, paths = [], &block) click to toggle source
# File lib/trusty/utilities/yaml.rb, line 8
def load_file(filename, paths = [], &block)
  # allow multiple filenames and use the first one that exists
  if path = PathFinder.find(filename, paths)
    load_content(File.read(path), &block)
  end
end