Module: SlackRubyBot::Config

Extended by:
Config
Included in:
Config
Defined in:
lib/slack-ruby-bot/config.rb

Constant Summary collapse

ATTRS =
%i[token url aliases user user_id team team_id allow_bot_messages allow_message_loops logger].freeze

Instance Method Summary collapse

Instance Method Details

#allow_bot_messages?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/slack-ruby-bot/config.rb', line 10

def allow_bot_messages?
  !!allow_bot_messages
end

#allow_message_loops?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/slack-ruby-bot/config.rb', line 14

def allow_message_loops?
  !!allow_message_loops
end

#reset!Object



18
19
20
# File 'lib/slack-ruby-bot/config.rb', line 18

def reset!
  ATTRS.each { |attr| send("#{attr}=", nil) }
end