Class: Slk::Commands::Debug
Overview
Hidden command for development spikes. Dumps raw JSON from Slack endpoints to validate xoxc compatibility and field shapes before building higher-level features.
Not registered in ‘slk help`.
Instance Attribute Summary
Attributes inherited from Base
#options, #positional_args, #runner
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Slk::Commands::Base
Instance Method Details
#dispatch_action ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/slk/commands/debug.rb', line 21 def dispatch_action case positional_args in ['profile', user] then dump_profile(user) in ['profile'] then dump_profile(nil) in ['team'] then dump_team in ['schema'] then dump_schema else unknown_action end end |
#execute ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/slk/commands/debug.rb', line 11 def execute result = return result if result dispatch_action rescue ApiError => e error("API error: #{e.}") 1 end |