Class: GitStats::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/git_stats/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/git_stats/cli.rb', line 9

def exit_on_failure?
  true
end

Instance Method Details

#generateObject



24
25
26
27
28
29
# File 'lib/git_stats/cli.rb', line 24

def generate
  I18n.locale = options[:language]
  GitStats::Generator.new(options) do |g|
    g.add_command_observer { |command, _result| puts command } unless options[:silent]
  end.render_all
end

#versionObject



32
33
34
# File 'lib/git_stats/cli.rb', line 32

def version
  puts "NovaGitStats #{GitStats::VERSION}"
end