bin/commands/rtm.rb in slack-ruby-client-2.0.0 vs bin/commands/rtm.rb in slack-ruby-client-2.1.0
- old
+ new
@@ -1,15 +1,21 @@
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake
-desc 'Rtm methods.'
-command 'rtm' do |g|
- g.desc 'Starts a Real Time Messaging session.'
- g.long_desc %( Starts a Real Time Messaging session. )
- g.command 'connect' do |c|
- c.flag 'batch_presence_aware', desc: 'Batch presence deliveries via subscription. Enabling changes the shape of presence_change events. See batch presence.'
- c.flag 'presence_sub', desc: 'Only deliver presence events when requested by subscription. See presence subscriptions.'
- c.action do |_global_options, options, _args|
- puts JSON.dump($client.rtm_connect(options))
+module Slack
+ module Cli
+ class App
+ desc 'Rtm methods.'
+ command 'rtm' do |g|
+ g.desc 'Starts a Real Time Messaging session.'
+ g.long_desc %( Starts a Real Time Messaging session. )
+ g.command 'connect' do |c|
+ c.flag 'batch_presence_aware', desc: 'Batch presence deliveries via subscription. Enabling changes the shape of presence_change events. See batch presence.'
+ c.flag 'presence_sub', desc: 'Only deliver presence events when requested by subscription. See presence subscriptions.'
+ c.action do |_global_options, options, _args|
+ puts JSON.dump(@client.rtm_connect(options))
+ end
+ end
+ end
end
end
end