17 lines
		
	
	
		
			401 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			401 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| require "commands/knife_commands"
 | |
| 
 | |
| class KnifeFactory
 | |
| 
 | |
|   @instance = nil
 | |
|   class << self
 | |
|     attr_accessor :instance
 | |
|     def init
 | |
|       c = DevopsConfig.config[:knife_config_file]
 | |
|       raise "Option ':knife_config_file' is undefined, please check config.rb file" unless c
 | |
|       @instance = KnifeCommands.new(c)
 | |
|       DevopsLogger.logger.info("Knife instance has been initialized")
 | |
|     end
 | |
|   end
 | |
| 
 | |
| end
 | 
