Sha256: 029ee46e0dcb80bdf9064baf1ad255bb35018189b8abbeeb186a5740bbb0d7b4

Contents?: true

Size: 324 Bytes

Versions: 1

Compression:

Stored size: 324 Bytes

Contents

SelfData.default_formats = [:erb, :yaml]
SelfData.default_options = {}
SelfData.filters = []

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.0.0 lib/self_data/config.rb