Class: CovLoupe::Commands::VersionCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- CovLoupe::Commands::VersionCommand
- Defined in:
- lib/cov_loupe/commands/version_command.rb
Instance Attribute Summary
Attributes inherited from BaseCommand
#cli, #config, #source_formatter
Instance Method Summary collapse
Methods inherited from BaseCommand
Constructor Details
This class inherits a constructor from CovLoupe::Commands::BaseCommand
Instance Method Details
#execute(_args) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/cov_loupe/commands/version_command.rb', line 10 def execute(_args) @gem_root = File.('../../..', __dir__) if config.format == :table data = { 'Version' => CovLoupe::VERSION, 'Gem Root' => @gem_root, 'Documentation' => 'README.md and docs/user/**/*.md in gem root' } puts TableFormatter.format_vertical(data) else puts CovLoupe::Formatters.format(version_info, config.format) end end |