class Chef::Role
Attributes
logger[R]
Public Instance Methods
generate_json(part)
click to toggle source
# File lib/chef/knife/chop/chef_role.rb, line 32 def generate_json(part) self.to_json end
generate_rb(part)
click to toggle source
# File lib/chef/knife/chop/chef_role.rb, line 37 def generate_rb(part) src = [] src << "name '#{@name}'" src << "description '#{@description}'" src << part.hash_to_rb('default_attributes') src << part.hash_to_rb('override_attributes') src << part.run_lists_to_rb(@run_list) if @run_list src << part.run_lists_to_rb(@env_run_lists,'env_run_lists') if @env_run_lists src.join("\n") end