Class: AssLauncher::Enterprise::Cli::Parameters::ParametersList Private
- Inherits:
-
Object
- Object
- AssLauncher::Enterprise::Cli::Parameters::ParametersList
- 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 one version
Instance Method Summary collapse
-
#<<(p) ⇒ Object
(also: #+, #add)
private
Add parameter in to tail of list.
-
#each(&block) ⇒ Object
private
:nodoc:.
-
#find(name, parent) ⇒ StringParam Flag Path Switch Chose nil
private
Find parameter in list.
-
#param_defined?(p) ⇒ Boolean
private
Returns
true
if parameterp
presents in list. -
#parameters ⇒ Object
private
Array of parameters.
-
#usage ⇒ Object
private
Builds usage message.
Instance Method Details
#<<(p) ⇒ Object Also known as: +, add
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 in to tail of list
427 428 429 430 431 432 |
# File 'lib/ass_launcher/enterprise/cli/parameters.rb', line 427 def <<(p) fail ArgumentError, "Parameter #{p.full_name} alrady defined" if\ param_defined?(p) parameters << p end |
#each(&block) ⇒ 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.
:nodoc:
452 453 454 |
# File 'lib/ass_launcher/enterprise/cli/parameters.rb', line 452 def each(&block) parameters.each(&block) end |
#find(name, parent) ⇒ StringParam Flag Path Switch Chose nil
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 parameter in list
441 442 443 444 445 446 447 448 449 |
# File 'lib/ass_launcher/enterprise/cli/parameters.rb', line 441 def find(name, parent) parameters.each do |p| if p.to_sym == name.downcase.to_sym && p.parent == parent return p end end nil end |
#param_defined?(p) ⇒ 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
presents in list
420 421 422 |
# File 'lib/ass_launcher/enterprise/cli/parameters.rb', line 420 def param_defined?(p) !find(p.name, p.parent).nil? 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 #<<
414 415 416 |
# File 'lib/ass_launcher/enterprise/cli/parameters.rb', line 414 def parameters @parameters ||= [] end |
#usage ⇒ 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.
Builds usage message
457 458 459 |
# File 'lib/ass_launcher/enterprise/cli/parameters.rb', line 457 def usage fail NotImplementedError end |