Class: ChefDK::Command::GeneratorCommands::CookbookFile
- Inherits:
 - 
      CookbookCodeFile
      
        
- Object
 - Base
 - Base
 - CookbookCodeFile
 - ChefDK::Command::GeneratorCommands::CookbookFile
 
 
- Defined in:
 - lib/chef-dk/command/generator_commands/cookbook_file.rb
 
Overview
chef generate file [path/to/cookbook_root] name –source=source_file
Instance Attribute Summary
Attributes inherited from CookbookCodeFile
#cookbook_path, #errors, #new_file_basename
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from CookbookCodeFile
#cookbook_name, #cookbook_root, #initialize, #params_valid?, #read_and_validate_params, #run, #validate_cookbook_path
Methods inherited from Base
#chef_runner, #generator_cookbook_name, #generator_cookbook_path, #have_git?, #initialize
Methods included from ChefDK::Configurable
#chef_config, #chefdk_config, #config_loader, #default_chef_server_http_client, #generator_config, #knife_config, #reset_config!
Methods inherited from Base
#check_license_acceptance, #initialize, #needs_help?, #needs_version?, #run_with_default_options
Methods included from Helpers
#chefdk_home, #err, #git_bin_dir, #git_windows_bin_dir, #msg, #omnibus_apps_dir, #omnibus_bin_dir, #omnibus_chefdk_location, #omnibus_embedded_bin_dir, #omnibus_env, #omnibus_install?, #omnibus_root, #stderr, #stdout, #system_command, #usr_bin_path, #usr_bin_prefix
Constructor Details
This class inherits a constructor from ChefDK::Command::GeneratorCommands::CookbookCodeFile
Instance Method Details
#recipe ⇒ Object
      35 36 37  | 
    
      # File 'lib/chef-dk/command/generator_commands/cookbook_file.rb', line 35 def recipe "cookbook_file" end  | 
  
#setup_context ⇒ Object
      39 40 41 42  | 
    
      # File 'lib/chef-dk/command/generator_commands/cookbook_file.rb', line 39 def setup_context super Generator.add_attr_to_context(:content_source, config[:source]) end  |