Class: Teems::Commands::Channels

Inherits:
Base
  • Object
show all
Defined in:
lib/teems/commands/channels.rb

Overview

List joined teams and their channels

Instance Attribute Summary

Attributes inherited from Base

#options, #positional_args, #runner

Instance Method Summary collapse

Constructor Details

#initialize(args, runner:) ⇒ Channels

Returns a new instance of Channels.



7
8
9
10
# File 'lib/teems/commands/channels.rb', line 7

def initialize(args, runner:)
  @options = {}
  super
end

Instance Method Details

#executeObject



12
13
14
15
16
17
18
19
20
# File 'lib/teems/commands/channels.rb', line 12

def execute
  result = validate_options
  return result if result

  auth_result = require_auth
  return auth_result if auth_result

  list_teams_and_channels
end