class ChefApply::Action::GenerateTempCookbook
Attributes
generated_cookbook[R]
Public Class Methods
from_options(opts)
click to toggle source
# File lib/chef_apply/action/generate_temp_cookbook.rb, line 24 def self.from_options(opts) if opts.key?(:recipe_spec) GenerateCookbookFromRecipe.new(opts) elsif opts.key?(:resource_name) && opts.key?(:resource_type) && opts.key?(:resource_properties) GenerateCookbookFromResource.new(opts) else raise MissingOptions.new(opts) end end
new(options)
click to toggle source
Calls superclass method
ChefApply::Action::Base::new
# File lib/chef_apply/action/generate_temp_cookbook.rb, line 36 def initialize(options) super(options) require_relative "generate_temp_cookbook/temp_cookbook" @generated_cookbook ||= TempCookbook.new end
Public Instance Methods
generate()
click to toggle source
# File lib/chef_apply/action/generate_temp_cookbook.rb, line 48 def generate raise NotImplemented end
perform_action()
click to toggle source
# File lib/chef_apply/action/generate_temp_cookbook.rb, line 42 def perform_action notify(:generating) generate notify(:success) end