Class: ChefDK::ChefProvider::GeneratorDesc

Inherits:
Chef::Provider
  • Object
show all
Defined in:
lib/chef-dk/command/generator_commands/chef_exts/generator_desc_resource.rb

Overview

Chef log provider, allows logging to chef’s logs from recipes

Instance Method Summary collapse

Instance Method Details

#action_writeObject

Write the log to Chef’s log

Return

true

Always return true



77
78
79
80
# File 'lib/chef-dk/command/generator_commands/chef_exts/generator_desc_resource.rb', line 77

def action_write
  run_context.events.subscribers.first.puts_line("- #{new_resource.message}")
  new_resource.updated_by_last_action(true)
end

#load_current_resourceObject

No concept of a ‘current’ resource for logs, this is a no-op

Return

true

Always return true



69
70
71
# File 'lib/chef-dk/command/generator_commands/chef_exts/generator_desc_resource.rb', line 69

def load_current_resource
  true
end

#whyrun_supported?Boolean

Returns:

  • (Boolean)


61
62
63
# File 'lib/chef-dk/command/generator_commands/chef_exts/generator_desc_resource.rb', line 61

def whyrun_supported?
  true
end