Class: AssLauncher::Enterprise::Cli::Parameters::AllParameters Private
- Inherits:
-
Object
- Object
- AssLauncher::Enterprise::Cli::Parameters::AllParameters
- Defined in:
- lib/ass_launcher/enterprise/cli/parameters.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.
List of parameters defined for all versions
Instance Method Summary collapse
-
#add(p, version) ⇒ Object
private
Add parameter into list.
-
#find(name, parent) ⇒ Array
private
Find all parameter versions.
-
#find_for_version(name, parent, version) ⇒ Object
private
Find actual parameter for
version
. -
#param_defined?(p, version) ⇒ Boolean
private
Returns
true
if parameterp
forversion
presents in list. -
#parameters ⇒ Object
private
Array of parameters.
-
#to_parameters_list(binary_wrapper, run_mode) ⇒ ParametersList
private
Return parameters list for given
binary_wrapper
andrun_mode
.
Instance Method Details
#add(p, version) ⇒ 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.
Add parameter into list
475 476 477 478 |
# File 'lib/ass_launcher/enterprise/cli/parameters.rb', line 475 def add(p, version) fail_if_difined(p, version) parameters << p end |
#find(name, parent) ⇒ Array
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.
Find all parameter versions
536 537 538 539 540 541 |
# File 'lib/ass_launcher/enterprise/cli/parameters.rb', line 536 def find(name, parent) parameters.select do |p| p.to_sym == name.downcase.to_sym && p.parent == parent end end |
#find_for_version(name, parent, version) ⇒ 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.
Find actual parameter for version
518 519 520 521 522 523 524 |
# File 'lib/ass_launcher/enterprise/cli/parameters.rb', line 518 def find_for_version(name, parent, version) r = nil find(name, parent).each do |p| r = oops!(r, p, version) if p.match_version? version end r end |
#param_defined?(p, version) ⇒ Boolean
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.
Returns true
if parameter p
for version
presents in list
490 491 492 493 494 495 |
# File 'lib/ass_launcher/enterprise/cli/parameters.rb', line 490 def param_defined?(p, version) find(p.name, p.parent).each do |p_| return true if p_.match_version? version end false end |
#parameters ⇒ 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.
Array of parameters. For add parameter into array use #add
467 468 469 |
# File 'lib/ass_launcher/enterprise/cli/parameters.rb', line 467 def parameters @parameters ||= [] end |
#to_parameters_list(binary_wrapper, run_mode) ⇒ ParametersList
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.
Return parameters list for given binary_wrapper
and run_mode
500 501 502 503 504 505 506 |
# File 'lib/ass_launcher/enterprise/cli/parameters.rb', line 500 def to_parameters_list(binary_wrapper, run_mode) r = new_list parameters.each do |p| r << p if p.match? binary_wrapper, run_mode end r end |