Sha256: 695b066c5185678f315017d12655d0fcdeedcd68ec3975d984ca83a4abeb0dfd

Contents?: true

Size: 709 Bytes

Versions: 2

Compression:

Stored size: 709 Bytes

Contents

# frozen_string_literal: true

module SlackRubyBotServer
  module Events
    module AppMentions
      module Config
        extend self

        ATTRIBUTES = %i[
          handlers
        ].freeze

        attr_accessor(*Config::ATTRIBUTES - [:handlers])
        attr_writer :handlers

        def handlers
          @handlers || SlackRubyBotServer::Events::AppMentions::Mention.handlers
        end

        def reset!
          self.handlers = nil
        end
      end

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

        def config
          Config
        end
      end
    end
  end
end

SlackRubyBotServer::Events::AppMentions::Config.reset!

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
slack-ruby-bot-server-events-app-mentions-0.1.1 lib/slack-ruby-bot-server-events-app-mentions/config.rb
slack-ruby-bot-server-events-app-mentions-0.1.0 lib/slack-ruby-bot-server-events-app-mentions/config.rb