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)


7
8
9
# File 'lib/git_stats/cli.rb', line 7

def exit_on_failure?
  true
end

Instance Method Details

#generateObject



22
23
24
25
26
27
# File 'lib/git_stats/cli.rb', line 22

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

#versionObject



30
31
32
# File 'lib/git_stats/cli.rb', line 30

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