Class: Slk::Commands::Presence

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

Overview

Gets or sets user presence (away/active)

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



9
10
11
12
13
14
15
16
17
# File 'lib/slk/commands/presence.rb', line 9

def execute
  result = validate_options
  return result if result

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