Class: AssLauncher::Cmd::Main::SubCommands::ShowVersion Private

Inherits:
Abstract::SubCommand show all
Includes:
Enterprise::CliDefsLoader
Defined in:
lib/ass_launcher/cmd.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

show-version subcommand

Constant Summary

Constants included from Enterprise::CliDefsLoader

Enterprise::CliDefsLoader::DEFS_PATH

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Abstract::SubCommand::Declaration

#declare_subcommands, #subcommand_

Class Method Details

._bannerObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



845
846
847
848
# File 'lib/ass_launcher/cmd.rb', line 845

def self._banner
  'Show version of ass_launcher gem and'\
    ' list of known 1C:Enterprise'
end

.command_nameObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



841
842
843
# File 'lib/ass_launcher/cmd.rb', line 841

def self.command_name
  'show-version'
end

Instance Method Details

#executeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



854
855
856
857
858
859
# File 'lib/ass_launcher/cmd.rb', line 854

def execute
  puts Colorize.yellow('ass_launcher:')\
    + Colorize.green(" v#{AssLauncher::VERSION}")
  puts Colorize.yellow('Known 1C:Enterprise:')
  puts Colorize.green(known_versions_list)
end

#known_versions_listObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



850
851
852
# File 'lib/ass_launcher/cmd.rb', line 850

def known_versions_list
  " - v#{defs_versions.reverse.map(&:to_s).join("\n - v")}"
end