Method: Codebuild::Command.alter_command_description

Defined in:
lib/codebuild/command.rb

.alter_command_description(command) ⇒ Object



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/codebuild/command.rb', line 55

def alter_command_description(command)
  return unless command

  # Add description to beginning of long_description
  long_desc = if command.long_description
      "#{command.description}\n\n#{command.long_description}"
    else
      command.description
    end

  # add reference url to end of the long_description
  unless website.empty?
    full_command = [command.ancestor_name, command.name].compact.join('-')
    url = "#{website}/reference/codebuild-#{full_command}"
    long_desc += "\n\nHelp also available at: #{url}"
  end

  command.long_description = long_desc
end