lib/self_data/config.rb in self_data-1.2.0 vs lib/self_data/config.rb in self_data-1.2.1

- old
+ new

@@ -1,6 +1,10 @@ # frozen_string_literal: true +require "erb" +require "yaml" +require "json" + SelfData.default_formats = [:erb, :yaml] SelfData.default_options = {} SelfData.add_converter :erb, -> (data, options) { ERB.new(data).result(options[:context]) } SelfData.add_converter :yaml, -> (data, _options) { YAML.load(data) }