[#25] adding command_observer unless silent option is provided

This commit is contained in:
Tomasz Gieniusz 2013-08-29 20:53:43 +02:00
parent ad8687f166
commit 39aa2668d4
1 changed files with 1 additions and 5 deletions

View File

@ -14,11 +14,7 @@ class GitStats::CLI < Thor
def generate
I18n.locale = options[:language]
GitStats::Generator.new(options[:path], options[:output], options[:from], options[:to]) { |g|
if options[:silent]
g.add_command_observer { |command, result| }
else
g.add_command_observer { |command, result| puts "#{command}" }
end
g.add_command_observer { |command, result| puts "#{command}" } unless options[:silent]
}.render_all
end