class ChefDK::Generator::Context
This is here to hold attr_accessor data for Generator
context variables
Public Class Methods
add_attr(name)
click to toggle source
# File lib/chef-dk/generator.rb, line 24 def self.add_attr(name) @attributes ||= [ ] unless @attributes.include?(name) @attributes << name attr_accessor(name) end end
reset()
click to toggle source
# File lib/chef-dk/generator.rb, line 33 def self.reset return if @attributes.nil? @attributes.each do |attr| remove_method(attr) end @attributes = nil end