Sha256: cce3009d6b90e6d4bfba763cae220fb9fa7ba73d9fc482e5c0d12c01970ad743

Contents?: true

Size: 706 Bytes

Versions: 3

Compression:

Stored size: 706 Bytes

Contents

# frozen_string_literal: true
module Slack
  module Web
    class Client
      include Faraday::Connection
      include Faraday::Request
      include Api::Endpoints
      include Api::Options

      attr_accessor(*Config::ATTRIBUTES)

      def initialize(options = {})
        Slack::Web::Config::ATTRIBUTES.each do |key|
          send("#{key}=", options.fetch(key, Slack::Web.config.send(key)))
        end
        @logger ||= Slack::Config.logger || Slack::Logger.default
        @token ||= Slack.config.token
      end

      class << self
        def configure
          block_given? ? yield(Config) : Config
        end

        def config
          Config
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slack-ruby-client-2.4.0 lib/slack/web/client.rb
slack-ruby-client-2.3.0 lib/slack/web/client.rb
slack-ruby-client-2.2.0 lib/slack/web/client.rb