Class: Kiba::Extend::Command::Fcar::Chute

Inherits:
Object
  • Object
show all
Defined in:
lib/kiba/extend/command/fcar/chute.rb

Overview

Wraps the creation of a formatted FCAR chute String from the Kiba::Extend::Fcar.chute config setting in a callable command class

Returns:

  • (String)

Since:

  • 7.0.0

Class Method Summary collapse

Class Method Details

.callObject

Since:

  • 7.0.0



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/kiba/extend/command/fcar/chute.rb', line 13

def self.call
  Kiba::Extend::Fcar.chute
    .map do |mod, comment|
      formatted_comment = if comment.empty?
        nil
      else
        "  #{comment}"
      end
      [mod, formatted_comment].compact
        .join("\n")
    end.join("\n")
end