Sha256: 44bcb1861989d91ebb0f857607baf1ed8b58e03c916a7d851d6f3d0dc258c1a8
Contents?: true
Size: 624 Bytes
Versions: 5
Compression:
Stored size: 624 Bytes
Contents
# frozen_string_literal: true require_relative 'ids.id' module Slack module Web module Api module Mixins module Users include Ids # # This method returns a user ID given a user name. # # @option options [user] :user # User to get ID for, prefixed with '@'. def users_id(options = {}) name = options[:user] raise ArgumentError, 'Required arguments :user missing' if name.nil? id_for :user, name, '@', :users_list, :members, 'user_not_found' end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems