Class: EacCli::RunnerWith::Help::ListSection

Inherits:
Object
  • Object
show all
Defined in:
lib/eac_cli/runner_with/help/list_section.rb

Constant Summary collapse

WORD_SEPARATOR =
' '
IDENTATION =
WORD_SEPARATOR * 2

Instance Method Summary collapse

Instance Method Details

#to_sString

Returns:

  • (String)


15
16
17
18
# File 'lib/eac_cli/runner_with/help/list_section.rb', line 15

def to_s
  (["#{title}:"] + items.map { |line| "#{IDENTATION}#{line}" })
    .map { |line| "#{line}\n" }.join
end