Class: Ufo::Param
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize ⇒ Param
constructor
A new instance of Param.
- #template_scope ⇒ Object
Constructor Details
Instance Method Details
#data ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/ufo/param.rb', line 11 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 |
#template_scope ⇒ Object
20 21 22 23 |
# File 'lib/ufo/param.rb', line 20 def template_scope self # TODO: add access to helpers like network # @template_scope ||= Ufo::TemplateScope.new(Ufo::DSL::Helper.new, nil) end |