Class: AssLauncher::Cmd::Abstract::Cli Private

Inherits:
SubCommand
  • Object
show all
Includes:
ClientMode, Option::DevMode, Option::Format, Option::Query, Option::ShowAppiaredOnly, Option::Verbose, Option::Version, Support::VersionValidator
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.

Abstarct cli-help command

Defined Under Namespace

Classes: Report

Constant Summary

Constants included from Enterprise::CliDefsLoader

Enterprise::CliDefsLoader::DEFS_PATH

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ClientMode

#client, #mode, #parrent_command

Methods included from Option::Verbose

included

Methods included from Option::Format

included

Methods included from Option::Query

included

Methods included from Option::DevMode

included

Methods included from Option::ShowAppiaredOnly

included

Methods included from Option::Version

included

Methods included from Support::VersionValidator

#known_version, #validate_version

Methods included from 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.



738
739
740
# File 'lib/ass_launcher/cmd.rb', line 738

def self._banner
  'show help for 1C:Enterprise CLI parameters'
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.

rubocop:enable Metrics/ClassLength



734
735
736
# File 'lib/ass_launcher/cmd.rb', line 734

def self.command_name
  'cli-help'
end

Instance Method Details

#columnsObject

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.



742
743
744
745
746
# File 'lib/ass_launcher/cmd.rb', line 742

def columns
  cols = dev_mode? ? Report::DEVEL_COLUMNS : Report::USAGE_COLUMNS
  cols -= [:parent, :parameter, :group, :require] unless verbose?
  cols
end

#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.



753
754
755
756
757
# File 'lib/ass_launcher/cmd.rb', line 753

def execute
  $stdout.puts formating Report.new(client, mode, validate_version,
                                    show_appiared_only?, query,
                                    dev_mode?)
end

#formating(report) ⇒ Object

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.



748
749
750
751
# File 'lib/ass_launcher/cmd.rb', line 748

def formating(report)
  return report.to_table(columns) if format == :ascii
  report.to_csv(columns)
end