module ChefDK::Generator

Public Class Methods

add_attr_to_context(name, value = nil) click to toggle source
# File lib/chef-dk/generator.rb, line 52
def self.add_attr_to_context(name, value = nil)
  sym_name = name.to_sym
  ChefDK::Generator::Context.add_attr(sym_name)
  ChefDK::Generator::TemplateHelper.delegate_to_app_context(sym_name)
  context.public_send("#{sym_name}=", value)
end
context() click to toggle source
# File lib/chef-dk/generator.rb, line 48
def self.context
  @context ||= Context.new
end
reset() click to toggle source
# File lib/chef-dk/generator.rb, line 44
def self.reset
  @context = nil
end