Module: AssLauncher::Cmd::Support::VersionValidator Private

Includes:
Enterprise::CliDefsLoader
Included in:
Abstract::Cli
Defined in:
lib/ass_launcher/cmd.rb

Overview

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

Mixin for validate version

Constant Summary

Constants included from Enterprise::CliDefsLoader

Enterprise::CliDefsLoader::DEFS_PATH

Instance Method Summary collapse

Instance Method Details

#known_versionObject

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.



65
66
67
# File 'lib/ass_launcher/cmd.rb', line 65

def known_version
  @known_version ||= defs_versions.sort
end

#validate_versionObject

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.



56
57
58
59
60
61
62
63
# File 'lib/ass_launcher/cmd.rb', line 56

def validate_version
  return known_version.sort.last if version.to_s.empty?
  unless known_version.include? version
    signal_usage_error "Unknown 1C:Enterprise v#{version}\n"\
      "Execute `ass-launcher show-version' command"
  end
  version
end