lib/slack/web/api/endpoints/usergroups_users.rb in slack-ruby-client-1.1.0 vs lib/slack/web/api/endpoints/usergroups_users.rb in slack-ruby-client-2.0.0

- old
+ new

@@ -16,11 +16,11 @@ # @option options [string] :team_id # encoded team id where the user group exists, required if org token is used. # @see https://api.slack.com/methods/usergroups.users.list # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups.users/usergroups.users.list.json def usergroups_users_list(options = {}) - throw ArgumentError.new('Required arguments :usergroup missing') if options[:usergroup].nil? + raise ArgumentError, 'Required arguments :usergroup missing' if options[:usergroup].nil? post('usergroups.users.list', options) end # # Update the list of users for a User Group @@ -34,11 +34,11 @@ # @option options [string] :team_id # encoded team id where the user group exists, required if org token is used. # @see https://api.slack.com/methods/usergroups.users.update # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups.users/usergroups.users.update.json def usergroups_users_update(options = {}) - throw ArgumentError.new('Required arguments :usergroup missing') if options[:usergroup].nil? - throw ArgumentError.new('Required arguments :users missing') if options[:users].nil? + raise ArgumentError, 'Required arguments :usergroup missing' if options[:usergroup].nil? + raise ArgumentError, 'Required arguments :users missing' if options[:users].nil? post('usergroups.users.update', options) end end end end