Class: Teems::Commands::Cal

Inherits:
Base
  • Object
show all
Includes:
CalCreateActions, CalDateRange, CalEventActions, CalEventResolver, CalInteractiveMode, CalSubcommandParser
Defined in:
lib/teems/commands/cal.rb

Overview

List calendar events and view event details

Constant Summary

Constants included from CalInteractiveMode

Teems::Commands::CalInteractiveMode::RSVP_KEYS

Constants included from CalEventActions

Teems::Commands::CalEventActions::RSVP_ACTION_LABELS

Constants included from CalSubcommandParser

Teems::Commands::CalSubcommandParser::RSVP_ACTIONS, Teems::Commands::CalSubcommandParser::SUBCOMMAND_PARSERS

Constants included from CalDateRange

Teems::Commands::CalDateRange::TIMEZONE_MAP

Instance Attribute Summary

Attributes inherited from Base

#options, #positional_args, #runner

Instance Method Summary collapse

Constructor Details

#initialize(args, runner:) ⇒ Cal

Returns a new instance of Cal.



751
752
753
754
755
756
757
# File 'lib/teems/commands/cal.rb', line 751

def initialize(args, runner:)
  @options = {}
  @subcommand = nil
  @event_ref = nil
  @create_subject = nil
  super
end

Instance Method Details

#executeObject



759
760
761
762
763
764
765
766
767
# File 'lib/teems/commands/cal.rb', line 759

def execute
  result = validate_options
  return result if result

  auth_result = require_auth
  return auth_result if auth_result

  dispatch_subcommand
end