Class: AssLauncher::Cmd::Abstract::Cli::Report::Row Private
- Inherits:
-
Object
- Object
- AssLauncher::Cmd::Abstract::Cli::Report::Row
- Includes:
- Support::AcceptedValuesGet
- 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.
Report’s row
Instance Attribute Summary collapse
- #param ⇒ Object readonly private
Instance Method Summary collapse
-
#basic_usage ⇒ Object
private
rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity rubocop:enable Metrics/MethodLength.
- #dsl_method_get ⇒ Object private
-
#initialize(param) ⇒ Row
constructor
private
A new instance of Row.
- #to_csv(columns) ⇒ Object private
- #usage_full ⇒ Object private
Methods included from Support::AcceptedValuesGet
#accepted_values_get, #xxx_list_keys
Constructor Details
#initialize(param) ⇒ Row
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 a new instance of Row.
503 504 505 506 |
# File 'lib/ass_launcher/cmd.rb', line 503 def initialize(param) @param = param fill end |
Instance Attribute Details
#param ⇒ Object (readonly)
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.
502 503 504 |
# File 'lib/ass_launcher/cmd.rb', line 502 def param @param end |
Instance Method Details
#basic_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.
rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity rubocop:enable Metrics/MethodLength
540 541 542 543 |
# File 'lib/ass_launcher/cmd.rb', line 540 def basic_usage return " #{param.name}" if param.parent param.name end |
#dsl_method_get ⇒ 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.
545 546 547 548 549 |
# File 'lib/ass_launcher/cmd.rb', line 545 def dsl_method_get method = param.name.gsub(%r{^\s*(/|-)}, '_') return " #{method}" if param.parent method end |
#to_csv(columns) ⇒ 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.
551 552 553 554 555 556 557 |
# File 'lib/ass_launcher/cmd.rb', line 551 def to_csv(columns) r = '' columns.each do |col| r << "\"#{send(col).to_s.tr('"', '\'')}\";" end r.gsub(/;$/, '') end |
#usage_full ⇒ 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.
524 525 526 527 528 529 530 531 532 533 534 535 536 |
# File 'lib/ass_launcher/cmd.rb', line 524 def usage_full case param.class.name.split('::').last when 'Switch' then ["#{basic_usage}(#{accepted_values_get.join('|')})"] when 'Chose' then [basic_usage, accepted_values_get.join(', ')] when 'StringParam' then [basic_usage, 'VALUE'] when 'Path' then [basic_usage, 'PATH'] when 'Flag' then [basic_usage] when 'PathTwice' then [basic_usage, 'PATH PATH'] else basic_usage end end |