Class: Zillabyte::Command::Help

Inherits:
Base
  • Object
show all
Defined in:
lib/zillabyte/cli/help.rb

Overview

list commands and display help

Constant Summary collapse

PRIMARY_NAMESPACES =
%w( data query apps components rpc )
ALIAS_TO_RPC =
%w( errors details )
ALIAS_TO_RPC_AND_COMPONENTS =
%w( logs )

Constants inherited from Base

Base::META_COLUMNS

Instance Attribute Summary

Attributes inherited from Base

#args, #options

Instance Method Summary collapse

Methods inherited from Base

#api, #initialize, namespace

Methods included from Helpers

#app, #ask, #command, #create_git_remote, #display, #error, #extract_app_from_git_config, #extract_app_in_dir, #format_with_bang, #friendly_dir, #get_flow_ui_link, #get_info, #get_rich_info, #git, #handle_downloading_manifest, #has_git?, #longest, #read_multiline, #truncate_message, #version_okay?, #with_tty

Constructor Details

This class inherits a constructor from Zillabyte::Command::Base

Instance Method Details

#index(*direct_args) ⇒ Object

help



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/zillabyte/cli/help.rb', line 12

def index(*direct_args)
  
  if command = args.shift || direct_args.shift
    if command == "aliases"
      puts "Useful aliases: "
      puts
      Zillabyte::Command.load("")
      summary_for_aliases(Zillabyte::Command.command_aliases)
    else
      help_for_command(command)
    end
  else
    help_for_root
  end
end