 		@grunt = grunt
 		@chalk = chalk
 		@moment = moment
-		@log.update = @_log_update
-
-# @hookFor that doesn’t requre to be invoked from constructor.
-# Can be used inside @prompt.
+		@log.update = @_logUpdate
+
+###
+@hookFor that doesn’t requre to be invoked from constructor. Can be used inside @prompt.
+###
 Generator::hookFor = (name, config) ->
 	config ?= {}
 

Generator::delete = ->
	grunt.file.delete arguments...

Generator::_log_update = ->
	@write (chalk.yellow '   update ')
	@write (util.format.apply util, arguments) + '\n'
	this

	column = lines.pop().length + 1
	"#{line}:#{column}"

###
Prints an error message and exits.

@param {String} message Error message.
###
Generator::stop = (message) ->
	@error message
	process.exit()

###
Prints an error message and exits if file exists.

@param {String} [filepath] Path to a file.
###
Generator::stopIfExists = (filepath) ->
	return  unless fs.existsSync filepath
	@stop "File `#{filepath}` already exists."

###
Writes file.

@param {String} [filepath] Path to a file.
@param {String} [content] Contents.
###
Generator::writeFile = (filepath, content) ->
	fs.writeFileSync (path.join process.cwd(), filepath), content

###
Chooses first existent folder.

@param [Array] dirs Folders list.
###
Generator::preferDir = (dirs) ->
	for dir in dirs
		return dir  if fs.existsSync dir
	null

###
Checks whether current folder is a Wordpress istallation.
###
Generator::isWordpress = ->
	fs.existsSync 'wp-config.php'

###
Checks whether current folder is a Wordpress theme folder.
###
Generator::isWordpressTheme = ->
	(fs.existsSync 'header.php') and (fs.existsSync 'footer.php') and (fs.existsSync 'functions.php')

###
Installs Bower packages.

@param {Array} packages Packages.
@param {Boolean} [skip_gitignore] Do not add `bower_components` to `.gitignore` (default: false).
###
Generator::installFromBower = (packages, skip_gitignore = false) ->
	return  if @options['skip-bower']
	return  if @options['skip-install']
