Sha256: 920cfb5c4628bc32a2e4e2df90af5f1841358d09d68214e6208368e49716a0b0
Contents?: true
Size: 547 Bytes
Versions: 22
Compression:
Stored size: 547 Bytes
Contents
require 'yaml' module Ufo class Param extend Memoist def initialize @params_path = "#{Ufo.root}/.ufo/params.yml" end def data return {} unless File.exist?(@params_path) result = RenderMePretty.result(@params_path, context: template_scope) data = YAML.load(result) || {} data.deep_symbolize_keys end memoize :data def template_scope self # TODO: add access to helpers like network # @template_scope ||= Ufo::TemplateScope.new(Ufo::DSL::Helper.new, nil) end end end
Version data entries
22 entries across 22 versions & 1 rubygems