Sha256: 1560475a967706986ba549e9dadd89201e469e20acc7b7e2c975ec0327400948
Contents?: true
Size: 381 Bytes
Versions: 1
Compression:
Stored size: 381 Bytes
Contents
# 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) } SelfData.add_converter :json, -> (data, _options) { JSON.parse(data) }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
self_data-1.2.1 | lib/self_data/config.rb |