Sha256: 847ad0e7fcdea981815050651ece81a8a514257de3c371c3003d56c32ca9b397

Contents?: true

Size: 519 Bytes

Versions: 5

Compression:

Stored size: 519 Bytes

Contents

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

5 entries across 5 versions & 1 rubygems

Version Path
slack-ruby-client-0.14.4 lib/slack/events/config.rb
slack-ruby-client-0.14.3 lib/slack/events/config.rb
slack-ruby-client-0.14.2 lib/slack/events/config.rb
slack-ruby-client-0.14.1 lib/slack/events/config.rb
slack-ruby-client-0.14.0 lib/slack/events/config.rb