Class: Ufo::Param

Inherits:
Object
  • Object
show all
Extended by:
Memoist
Defined in:
lib/ufo/param.rb

Instance Method Summary collapse

Constructor Details

#initializeParam

Returns a new instance of Param.



8
9
10
# File 'lib/ufo/param.rb', line 8

def initialize
  @params_path = "#{Ufo.root}/.ufo/params.yml"
end

Instance Method Details

#dataObject



17
18
19
20
21
# File 'lib/ufo/param.rb', line 17

def data
  vars = Ufo::TemplateScope.new(helper).assign_instance_variables
  result = RenderMePretty.result(@params_path, vars)
  YAML.load(result)
end

#helperObject



12
13
14
15
# File 'lib/ufo/param.rb', line 12

def helper
  dsl = DSL.new("#{Ufo.root}/.ufo/task_definitions.rb", quiet: true, mute: true)
  dsl.helper
end