Sha256: b5e1ccd0a54cd66760541f94da9c4eb538b89252371811a32113437e7636eae1

Contents?: true

Size: 655 Bytes

Versions: 3

Compression:

Stored size: 655 Bytes

Contents

# frozen_string_literal: true
require_relative 'ids.id'

module Slack
  module Web
    module Api
      module Mixins
        module Groups
          include Ids
          #
          # This method returns a group ID given a group name.
          #
          # @option options [channel] :channel
          #   Group channel to get ID for, prefixed with #.
          def groups_id(options = {})
            name = options[:channel]
            throw ArgumentError.new('Required arguments :channel missing') if name.nil?

            id_for :group, name, '#', :groups_list, :groups, 'channel_not_found'
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slack-ruby-client-0.17.0 lib/slack/web/api/mixins/groups.id.rb
slack-ruby-client-0.16.0 lib/slack/web/api/mixins/groups.id.rb
slack-ruby-client-0.15.1 lib/slack/web/api/mixins/groups.id.rb