Class: Ace::Docs::CLI::Commands::Update

Inherits:
Support::Cli::Command
  • Object
show all
Includes:
ScopeOptions, Support::Cli::Base
Defined in:
lib/ace/docs/cli/commands/update.rb

Overview

ace-support-cli Command class for the update command

This command handles updating document frontmatter.

Defined Under Namespace

Classes: FileNotFoundError, MissingArgumentError, UpdateError

Constant Summary collapse

EXIT_SUCCESS =

Exit codes

0
EXIT_ERROR =
1

Instance Method Summary collapse

Instance Method Details

#call(file: nil, **options) ⇒ Object



70
71
72
73
74
75
76
77
78
# File 'lib/ace/docs/cli/commands/update.rb', line 70

def call(file: nil, **options)
  # Handle --help/-h passed as file argument
  if file == "--help" || file == "-h"
    # ace-support-cli will handle help automatically, so we just ignore
    return EXIT_SUCCESS
  end

  execute_update(file, options)
end