Class: Slk::Commands::Org

Inherits:
Base
  • Object
show all
Defined in:
lib/slk/commands/org.rb

Overview

Walk the Slack org chart by following Supervisor custom profile fields. Examples:

slk org                        # self, supervisors up to depth 3
slk org @alex                  # alex's chain
slk org Uxxx --depth 5
slk org --down                 # reports (best-effort, requires reindex for completeness)

Constant Summary collapse

DEFAULT_DEPTH =
5

Instance Attribute Summary

Attributes inherited from Base

#options, #positional_args, #runner

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Slk::Commands::Base

Instance Method Details

#executeObject



14
15
16
17
18
19
20
21
22
# File 'lib/slk/commands/org.rb', line 14

def execute
  result = validate_options
  return result if result

  run
rescue ApiError => e
  error("API error: #{e.message}")
  1
end