Sha256: 5e192e9489115fc5803c3874880fb5f3163b222c8c8f0e3ad57859ff54662930

Contents?: true

Size: 549 Bytes

Versions: 13

Compression:

Stored size: 549 Bytes

Contents

# frozen_string_literal: true
module Slack
  module Events
    module Config
      extend self

      ATTRIBUTES = %i[
        signing_secret
        signature_expires_in
      ].freeze

      attr_accessor(*Config::ATTRIBUTES)

      def reset
        self.signing_secret = ENV['SLACK_SIGNING_SECRET']
        self.signature_expires_in = 5 * 60
      end
    end

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

      def config
        Config
      end
    end
  end
end

Slack::Events::Config.reset

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
slack-ruby-client-2.4.0 lib/slack/events/config.rb
slack-ruby-client-2.3.0 lib/slack/events/config.rb
slack-ruby-client-2.2.0 lib/slack/events/config.rb
slack-ruby-client-2.1.0 lib/slack/events/config.rb
slack-ruby-client-2.0.0 lib/slack/events/config.rb
slack-ruby-client-1.1.0 lib/slack/events/config.rb
slack-ruby-client-1.0.0 lib/slack/events/config.rb
slack-ruby-client-0.17.0 lib/slack/events/config.rb
slack-ruby-client-0.16.0 lib/slack/events/config.rb
slack-ruby-client-0.15.1 lib/slack/events/config.rb
slack-ruby-client-0.15.0 lib/slack/events/config.rb
slack-ruby-client-0.14.6 lib/slack/events/config.rb
slack-ruby-client-0.14.5 lib/slack/events/config.rb